* [PATCH 4/8] stex: adjust default queue length
@ 2006-12-02 4:44 Ed Lin
2006-12-02 5:04 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Ed Lin @ 2006-12-02 4:44 UTC (permalink / raw)
To: linux-scsi; +Cc: James.Bottomley, jeff, promise_linux
Firmware of new version may adjust default queue length. It is
backward compatible.
Signed-off-by: Ed Lin <ed.lin@promise.com>
---
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index 92dbac0..a20cbd9 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -78,6 +78,7 @@ enum {
MU_MAX_DELAY_TIME = 240000,
MU_HANDSHAKE_SIGNATURE = 0x55aaaa55,
+ MU_HANDSHAKE_SIGNATURE_HALF = 0x5a5a0000,
HMU_PARTNER_TYPE = 2,
/* firmware returned values */
@@ -902,6 +903,7 @@ static int stex_handshake(struct st_hba
void __iomem *base = hba->mmio_base;
struct handshake_frame *h;
dma_addr_t status_phys;
+ u32 data;
int i;
if (readl(base + OMR0) != MU_HANDSHAKE_SIGNATURE) {
@@ -923,6 +925,13 @@ static int stex_handshake(struct st_hba
udelay(10);
+ data = readl(base + OMR1);
+ if ((data & 0xffff0000) == MU_HANDSHAKE_SIGNATURE_HALF) {
+ data &= 0x0000ffff;
+ if (hba->host->can_queue > data)
+ hba->host->can_queue = data;
+ }
+
h = (struct handshake_frame *)(hba->dma_mem + MU_REQ_BUFFER_SIZE);
h->rb_phy = cpu_to_le32(hba->dma_handle);
h->rb_phy_hi = cpu_to_le32((hba->dma_handle >> 16) >> 16);
@@ -1234,7 +1243,7 @@ stex_probe(struct pci_dev *pdev, const s
if (err)
goto out_free_irq;
- err = scsi_init_shared_tag_map(host, ST_CAN_QUEUE);
+ err = scsi_init_shared_tag_map(host, host->can_queue);
if (err) {
printk(KERN_ERR DRV_NAME "(%s): init shared queue failed\n",
pci_name(pdev));
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 4/8] stex: adjust default queue length
2006-12-02 4:44 [PATCH 4/8] stex: adjust default queue length Ed Lin
@ 2006-12-02 5:04 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2006-12-02 5:04 UTC (permalink / raw)
To: Ed Lin; +Cc: linux-scsi, James.Bottomley, promise_linux
Ed Lin wrote:
> Firmware of new version may adjust default queue length. It is
> backward compatible.
>
> Signed-off-by: Ed Lin <ed.lin@promise.com>
ACK patches 1-4
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-12-02 5:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-02 4:44 [PATCH 4/8] stex: adjust default queue length Ed Lin
2006-12-02 5:04 ` Jeff Garzik
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.