Re: [patch 0/3] AHCI Link Power Management

2007-06-13 Thread Pavel Machek
Hi!

> >> I'm not sure about this.  We need better PM framework to support 
> >> powersaving in other controllers and some ahcis don't save much
> >> when only link power management is used,
> > 
> > do you have data to support this?
> 
> Yeah, it was some Lenovo notebook.  Pavel is more familiar with the
> hardware.  Pavel, what was the notebook which didn't save much power
> with standard SATA power save but needed port to be completely turned off?

Thinkpad x60. Some one Kristen probably used while developing the
patch :-).
Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: scsi_cmnd accessors issues

2007-06-13 Thread Harrosh, Boaz
From: FUJITA Tomonori [mailto:[EMAIL PROTECTED]
Sent: Tue 6/12/2007 7:51 PM
To: Harrosh, Boaz
Cc: linux-scsi@vger.kernel.org; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL 
PROTECTED]
Subject: Re: scsi_cmnd accessors issues
 
> From: Boaz Harrosh <[EMAIL PROTECTED]>
> Subject: scsi_cmnd accessors issues
> Date: Tue, 12 Jun 2007 21:02:20 +0300
>
>> [2]
>> if I use __deprecated on request_buffer, request_bufflen, and use_sg with
>> scsi_sgtable implementation Than I get below list of files complaining:
>
>(snip)
>
>> and also these files from scsi-ml that need changing when implementation 
>> changes:
>> drivers/scsi/scsi.c
>> drivers/scsi/scsi_error.c
>> drivers/scsi/scsi_debug.c
>> 
>> (see: 0004-Convert-scsi-ml-to-use-of-new-scsi_sgtable.patch at scsi_cmnd.h)
>> 
>> Which of the files do you have pending patches for? Which do you need that I 
>> send
>> what I have for them?
>
>I don't think that SCSI-ml bidi will be got into 2.6.23. 2.6.23 will
>convert as many LLDs as possible. I don't think that we need such
>patches in scsi-misc or scsi-pending now.
>
>We need to agree on what the scsi bidi looks like first. When we add
>bidi support to scsi core, we can change scsi core (scsi.c, etc)
>together.

OK! But what about the _set_ accessors what are we doing with these? are we 
fixing the 
code or are we adding new _set_ accessors?

Boaz
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: scsi_cmnd accessors issues

2007-06-13 Thread FUJITA Tomonori
From: "Harrosh, Boaz" <[EMAIL PROTECTED]>
Subject: RE: scsi_cmnd accessors issues
Date: Wed, 13 Jun 2007 06:32:23 -0400

> From: FUJITA Tomonori [mailto:[EMAIL PROTECTED]
> Sent: Tue 6/12/2007 7:51 PM
> To: Harrosh, Boaz
> Cc: linux-scsi@vger.kernel.org; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL 
> PROTECTED]
> Subject: Re: scsi_cmnd accessors issues
>  
> > From: Boaz Harrosh <[EMAIL PROTECTED]>
> > Subject: scsi_cmnd accessors issues
> > Date: Tue, 12 Jun 2007 21:02:20 +0300
> >
> >> [2]
> >> if I use __deprecated on request_buffer, request_bufflen, and use_sg with
> >> scsi_sgtable implementation Than I get below list of files complaining:
> >
> >(snip)
> >
> >> and also these files from scsi-ml that need changing when implementation 
> >> changes:
> >> drivers/scsi/scsi.c
> >> drivers/scsi/scsi_error.c
> >> drivers/scsi/scsi_debug.c
> >> 
> >> (see: 0004-Convert-scsi-ml-to-use-of-new-scsi_sgtable.patch at scsi_cmnd.h)
> >> 
> >> Which of the files do you have pending patches for? Which do you need that 
> >> I send
> >> what I have for them?
> >
> >I don't think that SCSI-ml bidi will be got into 2.6.23. 2.6.23 will
> >convert as many LLDs as possible. I don't think that we need such
> >patches in scsi-misc or scsi-pending now.
> >
> >We need to agree on what the scsi bidi looks like first. When we add
> >bidi support to scsi core, we can change scsi core (scsi.c, etc)
> >together.
> 
> OK! But what about the _set_ accessors what are we doing with these? are we 
> fixing the 
> code or are we adding new _set_ accessors?

There are just two llds. I suspect that we can fix them. Or they can
access to the data directly (without the accessors) if we can't.

I don't think that introducing something like scsi_set_sg_count, which
is meaningless to most of llds, is a good idea.
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


blktrace for all SCSI devices

2007-06-13 Thread Christof Schmitt
As a follow-up to earlier discussions about adding statistics to the
SCSI layer (http://lkml.org/lkml/2006/9/26/151), i am looking what
data blktrace can provide.

One problem is that blktrace currently can only get the trace data
from block device files. This excludes retrieving trace data from
other SCSI devices, especially from tape drives. Looking at the code,
the SCSI layer internally uses the same request_queue per device. It
looks like the blktrace ioctls as interface to userspace are the first
thing that is missing. Is this all?

What would be a going idea to make the blktrace ioctls available for
all SCSI devices? My first approach would be to add them to the sg
devices. Any comments?

If there are now objections, i will try to implement the ioctls for sg
devices, to see if this actually works.

--
Christof Schmitt
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ips: convert to use the data buffer accessors

2007-06-13 Thread FUJITA Tomonori
Mark pointed out that the initial patch has problems in the breakup
handling. This is an updated patch.

---
>From 50d2daa783e6b323aeea30c9dddefba18f00f9e9 Mon Sep 17 00:00:00 2001
From: FUJITA Tomonori <[EMAIL PROTECTED]>
Date: Tue, 12 Jun 2007 13:18:26 -0400
Subject: [PATCH] ips: convert to use the data buffer accessors

- remove the unnecessary map_single path.

- convert to use the new accessors for the sg lists and the
parameters.

Jens Axboe <[EMAIL PROTECTED]> did the for_each_sg cleanup.

TODO: use scsi_for_each_sg() in the breakup handling.

Signed-off-by: FUJITA Tomonori <[EMAIL PROTECTED]>
---
 drivers/scsi/ips.c |  256 
 1 files changed, 99 insertions(+), 157 deletions(-)

diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index 84f4f5d..f9fce70 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -1104,7 +1104,7 @@ static int ips_queue(struct scsi_cmnd *SC, void (*done) 
(struct scsi_cmnd *))
/* A Reset IOCTL is only sent by the boot CD in extreme cases.  
 */
/* There can never be any system activity ( network or disk ), 
but check */
/* anyway just as a good practice.  
 */
-   pt = (ips_passthru_t *) SC->request_buffer;
+   pt = (ips_passthru_t *) scsi_sglist(SC);
if ((pt->CoppCP.cmd.reset.op_code == IPS_CMD_RESET_CHANNEL) &&
(pt->CoppCP.cmd.reset.adapter_flag == 1)) {
if (ha->scb_activelist.count != 0) {
@@ -1507,30 +1507,22 @@ static int ips_is_passthru(struct scsi_cmnd *SC)
if ((SC->cmnd[0] == IPS_IOCTL_COMMAND) &&
(SC->device->channel == 0) &&
(SC->device->id == IPS_ADAPTER_ID) &&
-   (SC->device->lun == 0) && SC->request_buffer) {
-   if ((!SC->use_sg) && SC->request_bufflen &&
-   (((char *) SC->request_buffer)[0] == 'C') &&
-   (((char *) SC->request_buffer)[1] == 'O') &&
-   (((char *) SC->request_buffer)[2] == 'P') &&
-   (((char *) SC->request_buffer)[3] == 'P'))
-   return 1;
-   else if (SC->use_sg) {
-   struct scatterlist *sg = SC->request_buffer;
-   char  *buffer; 
-
-   /* kmap_atomic() ensures addressability of the user 
buffer.*/
-   /* local_irq_save() protects the KM_IRQ0 address slot.  
   */
-   local_irq_save(flags);
-   buffer = kmap_atomic(sg->page, KM_IRQ0) + sg->offset; 
-   if (buffer && buffer[0] == 'C' && buffer[1] == 'O' &&
-   buffer[2] == 'P' && buffer[3] == 'P') {
-   kunmap_atomic(buffer - sg->offset, KM_IRQ0);
-   local_irq_restore(flags);
-   return 1;
-   }
-   kunmap_atomic(buffer - sg->offset, KM_IRQ0);
-   local_irq_restore(flags);
-   }
+   (SC->device->lun == 0) && scsi_sglist(SC)) {
+struct scatterlist *sg = scsi_sglist(SC);
+char  *buffer;
+
+/* kmap_atomic() ensures addressability of the user buffer.*/
+/* local_irq_save() protects the KM_IRQ0 address slot. */
+local_irq_save(flags);
+buffer = kmap_atomic(sg->page, KM_IRQ0) + sg->offset;
+if (buffer && buffer[0] == 'C' && buffer[1] == 'O' &&
+buffer[2] == 'P' && buffer[3] == 'P') {
+kunmap_atomic(buffer - sg->offset, KM_IRQ0);
+local_irq_restore(flags);
+return 1;
+}
+kunmap_atomic(buffer - sg->offset, KM_IRQ0);
+local_irq_restore(flags);
}
return 0;
 }
@@ -1581,18 +1573,14 @@ ips_make_passthru(ips_ha_t *ha, struct scsi_cmnd *SC, 
ips_scb_t *scb, int intr)
 {
ips_passthru_t *pt;
int length = 0;
-   int ret;
+   int i, ret;
+struct scatterlist *sg = scsi_sglist(SC);
 
METHOD_TRACE("ips_make_passthru", 1);
 
-   if (!SC->use_sg) {
-   length = SC->request_bufflen;
-   } else {
-   struct scatterlist *sg = SC->request_buffer;
-   int i;
-   for (i = 0; i < SC->use_sg; i++)
-   length += sg[i].length;
-   }
+scsi_for_each_sg(SC, sg, scsi_sg_count(SC), i)
+length += sg[i].length;
+
if (length < sizeof (ips_passthru_t)) {
/* wrong size */
DEBUG_VAR(1, "(%s%d) Passthru structure wrong size",
@@ -2016,7 +2004,7 @@ ips_cleanup_passthru(ips_ha_t * ha, ips_scb_t * scb)
 
METHOD_TRACE("ips_cleanup_passthru", 1);
 
-   if ((!scb) || (!scb->scsi_cmd)

Re: scsi_cmnd accessors issues

2007-06-13 Thread FUJITA Tomonori
From: Boaz Harrosh <[EMAIL PROTECTED]>
Subject: scsi_cmnd accessors issues
Date: Tue, 12 Jun 2007 21:02:20 +0300

Oops, I forgot to answer the status of lld conversion.

> [2]
> if I use __deprecated on request_buffer, request_bufflen, and use_sg with
> scsi_sgtable implementation Than I get below list of files complaining:
> drivers/ata/libata-scsi.c
> drivers/firewire/fw-sbp2.c

I've not converted yet.

> drivers/infiniband/ulp/srp/ib_srp.c

In scsi-pending tree and waits for ACKs.

> drivers/message/i2o/i2o_scsi.c

I've not converted yet.

> drivers/scsi/aacraid/aachba.c

In scsi-pending tree and got the ACK (will be moved to scsi-misc).

> drivers/scsi/lpfc/lpfc_scsi.c

In scsi-pending tree but Emulex reworked this patch. We can drop this.

> drivers/scsi/aha152x.c
> drivers/scsi/pcmcia/nsp_cs.c

I've not converted yet.

> drivers/scsi/sym53c8xx_2/sym_glue.h
> drivers/scsi/sym53c8xx_2/sym_glue.c

The patch was in my old bidi tree but seems that it's in neither
scsi-misc nor scsi-pending. I'll resend this.

> drivers/scsi/ncr53c8xx.c

In scsi-pending tree and waits for ACKs.

> drivers/scsi/advansys.c
> drivers/scsi/psi240i.c
> drivers/scsi/aha1542.c

I've not converted yet.

> drivers/scsi/ips.c

The maintainer pointed out that the initial patch has problems. I sent
an updated patch and waits for the ACK.

> drivers/scsi/fd_mcs.c
> drivers/scsi/in2000.c
> drivers/scsi/NCR5380.c
> drivers/scsi/qla1280.c
> drivers/scsi/seagate.c

I've not converted yet.

> drivers/scsi/dc395x.c

In scsi-pending tree and waits for ACKs.

> drivers/scsi/atp870u.c
> drivers/scsi/gdth.c
> drivers/scsi/ide-scsi.c
> drivers/scsi/ppa.c
> drivers/scsi/imm.c

I've not converted yet.

> drivers/scsi/hptiop.c

In scsi-pending tree and got ACKs (will be moved to scsi-misc).

> drivers/usb/image/microtek.c
> drivers/usb/storage/protocol.c
> drivers/usb/storage/transport.c
> drivers/usb/storage/shuttle_usbat.c
> drivers/usb/storage/sddr09.c
> drivers/usb/storage/freecom.c
> drivers/usb/storage/isd200.c

I've not converted yet.
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ips: convert to use the data buffer accessors

2007-06-13 Thread Salyzyn, Mark
ACK

Sincerely -- Mark Salyzyn

> -Original Message-
> From: FUJITA Tomonori [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 13, 2007 10:27 AM
> To: [EMAIL PROTECTED]
> Cc: linux-scsi@vger.kernel.org; Salyzyn, Mark
> Subject: [PATCH] ips: convert to use the data buffer accessors
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 2a/3] Expose Power Management Policy option to users

2007-06-13 Thread James Bottomley
On Tue, 2007-06-12 at 10:46 -0700, Kristen Carlson Accardi wrote:
> Expose Power Management Policy option to users
> 
> This patch will modify the scsi subsystem to allow
> users to set a power management policy for the link.
> 
> The scsi subsystem will create a new sysfs file for each
> host in /sys/class/scsi_host called "link_power_management_policy".
> This file can have 3 possible values:

I'm afraid the host isn't really the right place to put the link power
management policy (assuming you want to manage the individual links
separately) because there isn't a one to one correspondence between
links and hosts.

To take the model I understand: SAS; the links are managed at the phy
level, so the power policy should be set there and thus should probably
be a property of the phy object, which doesn't even exist in the SCSI
model, it only exists in the transport class.  It strikes me that even
for ATA, the same thing is probably true.

Now, I can see that the power management models of all the transports
might share some similarities (particularly at this three stage granular
level); if so, it might make sense to export helpers from the mid-layer
for the transport classes to use for this.

> Value Meaning
> ---
> min_power User wishes the link to conserve power as much as
>   possible, even at the cost of some performance
> 
> max_performance User wants priority to be on performance, not power
>   savings
> 
> medium_power  User wants power savings, with less performance cost
>   than min_power (but less power savings as well).

These seem like nicely sane and generic values.

James


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] i2o: convert to use the data buffer accessors

2007-06-13 Thread FUJITA Tomonori
- remove the unnecessary map_single path.

- convert to use the new accessors for the sg lists and the
parameters.

Note: needs to change i2o_dma_map_sg when the chaining sg is ready.

Signed-off-by: FUJITA Tomonori <[EMAIL PROTECTED]>
---
 drivers/message/i2o/i2o_scsi.c |   24 +++-
 1 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/drivers/message/i2o/i2o_scsi.c b/drivers/message/i2o/i2o_scsi.c
index 1045c8a..aa6fb94 100644
--- a/drivers/message/i2o/i2o_scsi.c
+++ b/drivers/message/i2o/i2o_scsi.c
@@ -377,12 +377,8 @@ static int i2o_scsi_reply(struct i2o_con
osm_err("SCSI error %08x\n", error);
 
dev = &c->pdev->dev;
-   if (cmd->use_sg)
-   dma_unmap_sg(dev, cmd->request_buffer, cmd->use_sg,
-cmd->sc_data_direction);
-   else if (cmd->SCp.dma_handle)
-   dma_unmap_single(dev, cmd->SCp.dma_handle, cmd->request_bufflen,
-cmd->sc_data_direction);
+
+   scsi_dma_unmap(cmd);
 
cmd->scsi_done(cmd);
 
@@ -664,21 +660,15 @@ #endif
 
if (sgl_offset != SGL_OFFSET_0) {
/* write size of data addressed by SGL */
-   *mptr++ = cpu_to_le32(SCpnt->request_bufflen);
+   *mptr++ = cpu_to_le32(scsi_bufflen(SCpnt));
 
/* Now fill in the SGList and command */
-   if (SCpnt->use_sg) {
-   if (!i2o_dma_map_sg(c, SCpnt->request_buffer,
-   SCpnt->use_sg,
+
+   if (scsi_sg_count(SCpnt)) {
+   if (!i2o_dma_map_sg(c, scsi_sglist(SCpnt),
+   scsi_sg_count(SCpnt),
SCpnt->sc_data_direction, &mptr))
goto nomem;
-   } else {
-   SCpnt->SCp.dma_handle =
-   i2o_dma_map_single(c, SCpnt->request_buffer,
-  SCpnt->request_bufflen,
-  SCpnt->sc_data_direction, &mptr);
-   if (dma_mapping_error(SCpnt->SCp.dma_handle))
-   goto nomem;
}
}
 
-- 
1.4.3.2

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: scsi_cmnd accessors issues

2007-06-13 Thread FUJITA Tomonori
From: FUJITA Tomonori <[EMAIL PROTECTED]>
Subject: Re: scsi_cmnd accessors issues
Date: Wed, 13 Jun 2007 20:24:42 +0900

> > drivers/scsi/sym53c8xx_2/sym_glue.h
> > drivers/scsi/sym53c8xx_2/sym_glue.c
> 
> The patch was in my old bidi tree but seems that it's in neither
> scsi-misc nor scsi-pending. I'll resend this.

Oops, this is in scsi-pending tree.

Here's the summary.

---
o Not converted yet

> drivers/ata/libata-scsi.c
> drivers/firewire/fw-sbp2.c
> drivers/scsi/advansys.c
> drivers/scsi/psi240i.c
> drivers/scsi/aha1542.c
> drivers/scsi/fd_mcs.c
> drivers/scsi/in2000.c
> drivers/scsi/NCR5380.c
> drivers/scsi/qla1280.c
> drivers/scsi/seagate.c
> drivers/scsi/atp870u.c
> drivers/scsi/gdth.c
> drivers/scsi/ide-scsi.c
> drivers/scsi/ppa.c
> drivers/scsi/imm.c
> drivers/scsi/aha152x.c
> drivers/scsi/pcmcia/nsp_cs.c
> drivers/usb/image/microtek.c
> drivers/usb/storage/protocol.c
> drivers/usb/storage/transport.c
> drivers/usb/storage/shuttle_usbat.c
> drivers/usb/storage/sddr09.c
> drivers/usb/storage/freecom.c
> drivers/usb/storage/isd200.c


o In scsi-pending tree and waits for ACKs

> drivers/infiniband/ulp/srp/ib_srp.c
> drivers/scsi/sym53c8xx_2/sym_glue.h
> drivers/scsi/sym53c8xx_2/sym_glue.c
> drivers/scsi/ncr53c8xx.c
> drivers/scsi/ibmvscsi/ibmvscsi.c


o In scsi-pending tree and got the ACKs

> drivers/scsi/aacraid/aachba.c
> drivers/scsi/hptiop.c
> drivers/scsi/mesh.c
> drivers/scsi/esp_scsi.c
> drivers/scsi/dc395x.c


o Not in scsi-pending tree and waits for ACKs

> drivers/scsi/iscsi_tcp.c
> drivers/scsi/libiscsi.c
> drivers/infiniband/ulp/iser/iscsi_iser.c
> drivers/infiniband/ulp/iser/iser_initiator.c
> drivers/message/i2o/i2o_scsi.c


o Not in scsi-pending tree and got the ACKs

> drivers/scsi/ips.c


o In scsi-pending tree but not necessary now

> drivers/scsi/lpfc/lpfc_scsi.c

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] i2o: convert to use the data buffer accessors

2007-06-13 Thread Salyzyn, Mark
Since Markus removed himself from the maintenance of this driver ... I
will offer my ACK if he is truly absent since this driver is apparently
primarily in support of the legacy Babylon class of I2O adapters from
DPT and Adaptec.

Sincerely -- Mark Salyzyn

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of FUJITA Tomonori
> Sent: Wednesday, June 13, 2007 11:41 AM
> To: [EMAIL PROTECTED]
> Cc: linux-scsi@vger.kernel.org
> Subject: [PATCH] i2o: convert to use the data buffer accessors
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 0/3] AHCI Link Power Management

2007-06-13 Thread Kristen Carlson Accardi
On Wed, 13 Jun 2007 11:04:30 +0200
Pavel Machek <[EMAIL PROTECTED]> wrote:

> Hi!
> 
> > >> I'm not sure about this.  We need better PM framework to support 
> > >> powersaving in other controllers and some ahcis don't save much
> > >> when only link power management is used,
> > > 
> > > do you have data to support this?
> > 
> > Yeah, it was some Lenovo notebook.  Pavel is more familiar with the
> > hardware.  Pavel, what was the notebook which didn't save much power
> > with standard SATA power save but needed port to be completely turned off?
> 
> Thinkpad x60. Some one Kristen probably used while developing the
> patch :-).

Yes - that confirms my conclusion that the first patch just wasn't
done correctly - cause when I measure the power savings with a power
meter on the X60 with my patches I see ~ 1W.
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH]: ESP reset bug fix

2007-06-13 Thread David Miller

James could you please push this bug fix from Thomas to Linus?

Thanks a lot!

[SCSI] ESP: Don't forget to clear ESP_FLAG_RESETTING.

From: Thomas Bogendoerfer <[EMAIL PROTECTED]>

esp_reset_cleanup() does everything necessary except clear
the flag, so we never exit resetting state.

Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
index ec71061..71caf2d 100644
--- a/drivers/scsi/esp_scsi.c
+++ b/drivers/scsi/esp_scsi.c
@@ -2033,6 +2033,7 @@ static void esp_reset_cleanup(struct esp *esp)
starget_for_each_device(tp->starget, NULL,
esp_clear_hold);
}
+   esp->flags &= ~ESP_FLAG_RESETTING;
 }
 
 /* Runs under host->lock */
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 0/3] AHCI Link Power Management

2007-06-13 Thread Pavel Machek
Hi!

> >Yeah, it was some Lenovo notebook.  Pavel is more 
> >familiar with the
> >hardware.  Pavel, what was the notebook which didn't 
> >save much power
> >with standard SATA power save but needed port to be 
> >completely turned off?
> 
> Pavel, if you have time, could you measure this with 
> Kristen's patch?

Kristen has same machine as me, and I have seen similar '1W' saving
with previous version of the patch. I'd trust her results.

Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 0/3] AHCI Link Power Management

2007-06-13 Thread Pavel Machek
Hi!

> >> I'm not sure about this.  We need better PM framework to support 
> >> powersaving in other controllers and some ahcis don't save much
> >> when only link power management is used,
> > 
> > do you have data to support this?
> 
> Yeah, it was some Lenovo notebook.  Pavel is more familiar with the
> hardware.  Pavel, what was the notebook which didn't save much power
> with standard SATA power save but needed port to be completely turned off?

Uhuh, now I understand why Arjan wanted me to test.

But I have same hw as Kristen, so I assume there must have been
something wrong with the old tests.

Sorry for confusion.
Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: qla2xxx errors? (2.6.19)

2007-06-13 Thread Csillag Tamas
On 06/12, Andrew Vasquez wrote:
> Could you load the driver with the ql2xextended_error_logging module
> parameter enabled:
> 
>   $ echo "6 4 1 7"  > /proc/sys/kernel/printk
>   $ insmod qla2xxx.ko ql2xextended_error_logging=1
> 
> and forward over the resultant messages file beginning with the load
> of the driver to the point at which the File-system failure occurs.

Ok, here we go...

Thanks.
-- 
CSILLAG Tamas (cstamas) - http://digitus.itk.ppke.hu/~cstamas

"Not all those who wander are lost."  - JRR Tolkien

2007-06-13_00:10:34.36780 kern.info: ACPI: PCI interrupt for device 
:06:01.1 disabled
2007-06-13_00:10:34.38819 kern.info: ACPI: PCI interrupt for device 
:06:01.0 disabled
2007-06-13_00:10:37.77002 kern.info: QLogic Fibre Channel HBA Driver
2007-06-13_00:10:37.77014 kern.info: ACPI: PCI Interrupt :06:01.0[A] -> GSI 
49 (level, low) -> IRQ 21
2007-06-13_00:10:37.77015 kern.info: qla2xxx :06:01.0: Found an ISP2312, 
irq 21, iobase 0xf885c000
2007-06-13_00:10:37.77023 kern.info: qla2xxx :06:01.0: Configuring PCI 
space...
2007-06-13_00:10:37.77041 kern.info: qla2xxx :06:01.0: Configure NVRAM 
parameters...
2007-06-13_00:10:37.85574 kern.info: qla2xxx :06:01.0: Verifying loaded 
RISC code...
2007-06-13_00:10:37.85576 kern.warn: scsi(5):  Load RISC code 
2007-06-13_00:10:37.95150 kern.warn: scsi(5): Verifying Checksum of loaded RISC 
code.
2007-06-13_00:10:37.97443 kern.warn: scsi(5): Checksum OK, start firmware.
2007-06-13_00:10:38.01821 kern.info: qla2xxx :06:01.0: Extended memory 
detected (512 KB)...
2007-06-13_00:10:38.01822 kern.info: qla2xxx :06:01.0: Resizing request 
queue depth (2048 -> 4096)...
2007-06-13_00:10:38.01829 kern.info: qla2xxx :06:01.0: Allocated (1308 KB) 
for firmware dump...
2007-06-13_00:10:38.05235 kern.warn: scsi(5): Issue init firmware.
2007-06-13_00:10:38.07547 kern.warn: DEBUG: detect hba 5 at address = e23262f8
2007-06-13_00:10:38.07549 kern.info: scsi5 : qla2xxx
2007-06-13_00:10:40.07542 kern.warn: scsi(5): qla2x00_loop_resync()
2007-06-13_00:10:41.66893 kern.warn: scsi(5): Asynchronous P2P MODE received.
2007-06-13_00:10:41.66896 kern.warn: scsi(5): Asynchronous LOOP UP (2 Gbps).
2007-06-13_00:10:41.66897 kern.info: qla2xxx :06:01.0: LOOP UP detected (2 
Gbps).
2007-06-13_00:10:41.67430 kern.warn: scsi(5): Asynchronous PORT UPDATE.
2007-06-13_00:10:41.67435 kern.info: scsi(5): Port database changed  0006 
.
2007-06-13_00:10:41.80908 kern.warn: scsi(5): Asynchronous PORT UPDATE ignored 
/0006/.
2007-06-13_00:10:41.80909 kern.warn: scsi(5): Asynchronous PORT UPDATE ignored 
/0007/.
2007-06-13_00:10:41.82060 kern.warn: scsi(5): Asynchronous PORT UPDATE ignored 
/0004/.
2007-06-13_00:10:42.14759 kern.warn: scsi(5): F/W Ready - OK 
2007-06-13_00:10:42.15900 kern.warn: scsi(5): fw_state=3 curr time=13a9568.
2007-06-13_00:10:42.17041 kern.warn: scsi(5): Configure loop -- dpc flags 
=0x40800e1
2007-06-13_00:10:42.18179 kern.warn: scsi(5): RSCN queue entry[0] = [00/00].
2007-06-13_00:10:42.19295 kern.warn: scsi(5): device_resync: rscn overflow.
2007-06-13_00:10:42.20485 kern.warn: scsi(5): RFT_ID exiting normally.
2007-06-13_00:10:42.21633 kern.warn: scsi(5): RFF_ID exiting normally.
2007-06-13_00:10:42.22760 kern.warn: scsi(5): RNN_ID exiting normally.
2007-06-13_00:10:42.23881 kern.warn: scsi(5): RSNN_NN exiting normally.
2007-06-13_00:10:42.25540 kern.warn: scsi(5): GID_PT entry - nn 
20112593fc1c pn 21112593fc1c portid=010100.
2007-06-13_00:10:42.26671 kern.warn: scsi(5): GID_PT entry - nn 
20112593f89c pn 21112593f89c portid=010200.
2007-06-13_00:10:42.27796 kern.warn: scsi(5): GID_PT entry - nn 
20145e241c2c pn 21145e241c2c portid=010300.
2007-06-13_00:10:42.28885 kern.warn: scsi(5): GID_PT entry - nn 
20145e241dd2 pn 21145e241dd2 portid=010400.
2007-06-13_00:10:42.29975 kern.warn: scsi(5): GID_PT entry - nn 
2000d12672a5 pn 2100d12672a5 portid=011100.
2007-06-13_00:10:42.29976 kern.warn: scsi(5): device wrap (011100)
2007-06-13_00:10:42.31919 kern.warn: scsi(5): Trying Fabric Login w/loop id 
0x0081 for port 010100.
2007-06-13_00:10:42.32992 kern.warn: scsi(5): Trying Fabric Login w/loop id 
0x0082 for port 010200.
2007-06-13_00:10:42.34015 kern.warn: scsi(5): Trying Fabric Login w/loop id 
0x0083 for port 010300.
2007-06-13_00:10:42.35005 kern.warn: scsi(5): Trying Fabric Login w/loop id 
0x0084 for port 011100.
2007-06-13_00:10:42.39558 kern.warn: scsi(5): LOOP READY
2007-06-13_00:10:42.39560 kern.info: qla2xxx :06:01.0: 
2007-06-13_00:10:42.39561 kern.warn:  QLogic Fibre Channel HBA Driver: 
8.01.07-k7-debug
2007-06-13_00:10:42.39562 kern.warn:   QLogic IBM FCEC - 
2007-06-13_00:10:42.39563 kern.warn:   ISP2312: PCI-X (133 MHz) @ :06:01.0 
hdma-, host#=5, fw=3.03.18 IPX
2007-06-13_00:10:42.39563 kern.info: ACPI: PCI Interrupt :06:01.1[B] -> GSI 
50 (level, low) -> IRQ 23
2007-06-13_00:10:42.39564 kern.info: qla2xxx 000

Re: [patch 2a/3] Expose Power Management Policy option to users

2007-06-13 Thread Jeff Garzik

James Bottomley wrote:

To take the model I understand: SAS; the links are managed at the phy
level, so the power policy should be set there and thus should probably
be a property of the phy object, which doesn't even exist in the SCSI
model, it only exists in the transport class.  It strikes me that even
for ATA, the same thing is probably true.

Now, I can see that the power management models of all the transports
might share some similarities (particularly at this three stage granular
level); if so, it might make sense to export helpers from the mid-layer
for the transport classes to use for this.



Agreed, in principle.

Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/5] ibmvscsi: Remove unnecessary map_sg check

2007-06-13 Thread Brian King

Since sg_tablesize is set appropriately in the scsi host template,
remove the unnecessary check to make sure it is not exceeded
following the dma_map_sg call.

Signed-off-by: Brian King <[EMAIL PROTECTED]>
---

 linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c |7 ---
 1 file changed, 7 deletions(-)

diff -puN drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_remove_map_sg_check 
drivers/scsi/ibmvscsi/ibmvscsi.c
--- linux-2.6/drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_remove_map_sg_check 
2007-06-11 11:15:52.0 -0500
+++ linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c  2007-06-11 
11:16:12.0 -0500
@@ -408,13 +408,6 @@ static int map_sg_data(struct scsi_cmnd 
return 1;
}
 
-   if (sg_mapped > SG_ALL) {
-   printk(KERN_ERR
-  "ibmvscsi: More than %d mapped sg entries, got %d\n",
-  SG_ALL, sg_mapped);
-   return 0;
-   }
-
indirect->table_desc.va = 0;
indirect->table_desc.len = sg_mapped * sizeof(struct srp_direct_buf);
indirect->table_desc.key = 0;
_
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/5] ibmvscsi: Enhanced error logging

2007-06-13 Thread Brian King

Converts ibmvscsi to use dev_printk and friends to simplify
debugging. ibmvscsi adapter initialization now looks like this:

ibmvscsi 3005: SRP_VERSION: 16.a
ibmvscsi 3005: partner initialization complete
ibmvscsi 3005: sent SRP login
ibmvscsi 3005: SRP_LOGIN succeeded

Additionally, this patch adds the logging of a couple return codes in
a couple logs.

Signed-off-by: Brian King <[EMAIL PROTECTED]>
---

 linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c  |  208 
 linux-2.6-bjking1/drivers/scsi/ibmvscsi/rpa_vscsi.c |   20 -
 2 files changed, 100 insertions(+), 128 deletions(-)

diff -puN drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_printk_enhancements 
drivers/scsi/ibmvscsi/ibmvscsi.c
--- linux-2.6/drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_printk_enhancements 
2007-06-13 16:02:19.0 -0500
+++ linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c  2007-06-13 
16:03:08.0 -0500
@@ -173,9 +173,8 @@ static void release_event_pool(struct ev
}
}
if (in_use)
-   printk(KERN_WARNING
-  "ibmvscsi: releasing event pool with %d "
-  "events still in use?\n", in_use);
+   dev_warn(hostdata->dev, "releasing event pool with %d "
+"events still in use?\n", in_use);
kfree(pool->events);
dma_free_coherent(hostdata->dev,
  pool->size * sizeof(*pool->iu_storage),
@@ -210,15 +209,13 @@ static void free_event_struct(struct eve
   struct srp_event_struct *evt)
 {
if (!valid_event_struct(pool, evt)) {
-   printk(KERN_ERR
-  "ibmvscsi: Freeing invalid event_struct %p "
-  "(not in pool %p)\n", evt, pool->events);
+   dev_err(evt->hostdata->dev, "Freeing invalid event_struct %p "
+   "(not in pool %p)\n", evt, pool->events);
return;
}
if (atomic_inc_return(&evt->free) != 1) {
-   printk(KERN_ERR
-  "ibmvscsi: Freeing event_struct %p "
-  "which is not in use!\n", evt);
+   dev_err(evt->hostdata->dev, "Freeing event_struct %p "
+   "which is not in use!\n", evt);
return;
}
 }
@@ -426,10 +423,9 @@ static int map_sg_data(struct scsi_cmnd 
   SG_ALL * sizeof(struct 
srp_direct_buf),
   &evt_struct->ext_list_token, 0);
if (!evt_struct->ext_list) {
-   printk(KERN_ERR
-  "ibmvscsi: Can't allocate memory for indirect 
table\n");
+   sdev_printk(KERN_ERR, cmd->device,
+   "Can't allocate memory for indirect 
table\n");
return 0;
-   
}
}
 
@@ -464,8 +460,8 @@ static int map_single_data(struct scsi_c
   cmd->request_bufflen,
   DMA_BIDIRECTIONAL);
if (dma_mapping_error(data->va)) {
-   printk(KERN_ERR
-  "ibmvscsi: Unable to map request_buffer for command!\n");
+   sdev_printk(KERN_ERR, cmd->device,
+   "Unable to map request_buffer for command!\n");
return 0;
}
data->len = cmd->request_bufflen;
@@ -496,13 +492,13 @@ static int map_data_for_srp_cmd(struct s
case DMA_NONE:
return 1;
case DMA_BIDIRECTIONAL:
-   printk(KERN_ERR
-  "ibmvscsi: Can't map DMA_BIDIRECTIONAL to read/write\n");
+   sdev_printk(KERN_ERR, cmd->device,
+   "Can't map DMA_BIDIRECTIONAL to read/write\n");
return 0;
default:
-   printk(KERN_ERR
-  "ibmvscsi: Unknown data direction 0x%02x; can't map!\n",
-  cmd->sc_data_direction);
+   sdev_printk(KERN_ERR, cmd->device,
+   "Unknown data direction 0x%02x; can't map!\n",
+   cmd->sc_data_direction);
return 0;
}
 
@@ -585,8 +581,7 @@ static int ibmvscsi_send_srp_event(struc
 ibmvscsi_send_crq(hostdata, crq_as_u64[0], crq_as_u64[1])) != 0) {
list_del(&evt_struct->list);
 
-   printk(KERN_ERR "ibmvscsi: send error %d\n",
-  rc);
+   dev_err(hostdata->dev, "send error %d\n", rc);
atomic_inc(&hostdata->request_limit);
goto send_error;
}
@@ -627,9 +622,8 @@ static void handle_cmd_rsp(struct srp_ev
 
if (unlikely(rsp->opcode != SRP_RSP)) {
if (printk_ratelimit())
-   printk(KERN_WARNING 
-  "ibmvscsi: bad S

[PATCH 3/5] ibmvscsi: Add eh_host_reset_handler

2007-06-13 Thread Brian King

Adds an eh_host_reset_handler to ibmvscsi which resets the connection
to the vscsi server. This patch also adds a timer to internally
issues commands to prevent client hangs in the case of a misbehaving
server. Tested by modifying the VIOS such that it would occasionally
drop one or more request in sequence.

Signed-off-by: Brian King <[EMAIL PROTECTED]>
---

 linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c |  136 -
 linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.h |1 
 2 files changed, 107 insertions(+), 30 deletions(-)

diff -puN drivers/scsi/ibmvscsi/ibmvscsi.h~ibmvscsi_timeout_handling 
drivers/scsi/ibmvscsi/ibmvscsi.h
--- linux-2.6/drivers/scsi/ibmvscsi/ibmvscsi.h~ibmvscsi_timeout_handling
2007-06-13 16:03:45.0 -0500
+++ linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.h  2007-06-13 
16:03:45.0 -0500
@@ -70,6 +70,7 @@ struct srp_event_struct {
union viosrp_iu iu;
void (*cmnd_done) (struct scsi_cmnd *);
struct completion comp;
+   struct timer_list timer;
union viosrp_iu *sync_srp;
struct srp_direct_buf *ext_list;
dma_addr_t ext_list_token;
diff -puN drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_timeout_handling 
drivers/scsi/ibmvscsi/ibmvscsi.c
--- linux-2.6/drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_timeout_handling
2007-06-13 16:03:45.0 -0500
+++ linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c  2007-06-13 
16:04:18.0 -0500
@@ -509,6 +509,70 @@ static int map_data_for_srp_cmd(struct s
return map_single_data(cmd, srp_cmd, dev);
 }
 
+/**
+ * purge_requests: Our virtual adapter just shut down.  purge any sent requests
+ * @hostdata:the adapter
+ */
+static void purge_requests(struct ibmvscsi_host_data *hostdata, int error_code)
+{
+   struct srp_event_struct *tmp_evt, *pos;
+   unsigned long flags;
+
+   spin_lock_irqsave(hostdata->host->host_lock, flags);
+   list_for_each_entry_safe(tmp_evt, pos, &hostdata->sent, list) {
+   list_del(&tmp_evt->list);
+   del_timer(&tmp_evt->timer);
+   if (tmp_evt->cmnd) {
+   tmp_evt->cmnd->result = (error_code << 16);
+   unmap_cmd_data(&tmp_evt->iu.srp.cmd,
+  tmp_evt,
+  tmp_evt->hostdata->dev);
+   if (tmp_evt->cmnd_done)
+   tmp_evt->cmnd_done(tmp_evt->cmnd);
+   } else if (tmp_evt->done)
+   tmp_evt->done(tmp_evt);
+   free_event_struct(&tmp_evt->hostdata->pool, tmp_evt);
+   }
+   spin_unlock_irqrestore(hostdata->host->host_lock, flags);
+}
+
+/**
+ * ibmvscsi_reset_host - Reset the connection to the server
+ * @hostdata:  struct ibmvscsi_host_data to reset
+*/
+static void ibmvscsi_reset_host(struct ibmvscsi_host_data *hostdata)
+{
+   scsi_block_requests(hostdata->host);
+   atomic_set(&hostdata->request_limit, 0);
+
+   purge_requests(hostdata, DID_ERROR);
+   if ((ibmvscsi_reset_crq_queue(&hostdata->queue, hostdata)) ||
+   (ibmvscsi_send_crq(hostdata, 0xC001LL, 0)) ||
+   (vio_enable_interrupts(to_vio_dev(hostdata->dev {
+   atomic_set(&hostdata->request_limit, -1);
+   dev_err(hostdata->dev, "error after reset\n");
+   }
+
+   scsi_unblock_requests(hostdata->host);
+}
+
+/**
+ * ibmvscsi_timeout - Internal command timeout handler
+ * @evt_struct:struct srp_event_struct that timed out
+ *
+ * Called when an internally generated command times out
+*/
+static void ibmvscsi_timeout(struct srp_event_struct *evt_struct)
+{
+   struct ibmvscsi_host_data *hostdata = evt_struct->hostdata;
+
+   dev_err(hostdata->dev, "Command timed out (%x). Resetting connection\n",
+   evt_struct->iu.srp.cmd.opcode);
+
+   ibmvscsi_reset_host(hostdata);
+}
+
+
 /* 
  * Routines for sending and receiving SRPs
  */
@@ -516,12 +580,14 @@ static int map_data_for_srp_cmd(struct s
  * ibmvscsi_send_srp_event: - Transforms event to u64 array and calls 
send_crq()
  * @evt_struct:evt_struct to be sent
  * @hostdata:  ibmvscsi_host_data of host
+ * @timeout:   timeout in seconds - 0 means do not time command
  *
  * Returns the value returned from ibmvscsi_send_crq(). (Zero for success)
  * Note that this routine assumes that host_lock is held for synchronization
 */
 static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct,
-  struct ibmvscsi_host_data *hostdata)
+  struct ibmvscsi_host_data *hostdata,
+  unsigned long timeout)
 {
u64 *crq_as_u64 = (u64 *) &evt_struct->crq;
int request_status;
@@ -577,9 +643,18 @@ static int ibmvscsi_send_srp_event(struc
 */
list_add_tail(&

[PATCH 4/5] ibmvscsi: Misc. locking fixes

2007-06-13 Thread Brian King

Fix a couple locking bugs discovered during code inspection.
ibmvscsi_send_srp_event needs to be called with the host lock
held. This patch fixes a couple paths in the code where this
wasn't true.

Signed-off-by: Brian King <[EMAIL PROTECTED]>
---

 linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c |6 ++
 1 file changed, 6 insertions(+)

diff -puN drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_fix_locking 
drivers/scsi/ibmvscsi/ibmvscsi.c
--- linux-2.6/drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_fix_locking 
2007-06-12 16:31:03.0 -0500
+++ linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c  2007-06-12 
16:40:19.0 -0500
@@ -845,6 +845,7 @@ static void send_mad_adapter_info(struct
 {
struct viosrp_adapter_info *req;
struct srp_event_struct *evt_struct;
+   unsigned long flags;
dma_addr_t addr;
 
evt_struct = get_event_struct(&hostdata->pool);
@@ -875,6 +876,7 @@ static void send_mad_adapter_info(struct
return;
}

+   spin_lock_irqsave(hostdata->host->host_lock, flags);
if (ibmvscsi_send_srp_event(evt_struct, hostdata, init_timeout * 2)) {
dev_err(hostdata->dev, "couldn't send ADAPTER_INFO_REQ!\n");
dma_unmap_single(hostdata->dev,
@@ -882,6 +884,7 @@ static void send_mad_adapter_info(struct
 sizeof(hostdata->madapter_info),
 DMA_BIDIRECTIONAL);
}
+   spin_unlock_irqrestore(hostdata->host->host_lock, flags);
 };
 
 /**
@@ -1357,6 +1360,7 @@ static int ibmvscsi_do_host_config(struc
 {
struct viosrp_host_config *host_config;
struct srp_event_struct *evt_struct;
+   unsigned long flags;
dma_addr_t addr;
int rc;
 
@@ -1388,7 +1392,9 @@ static int ibmvscsi_do_host_config(struc
}
 
init_completion(&evt_struct->comp);
+   spin_lock_irqsave(hostdata->host->host_lock, flags);
rc = ibmvscsi_send_srp_event(evt_struct, hostdata, init_timeout * 2);
+   spin_unlock_irqrestore(hostdata->host->host_lock, flags);
if (rc == 0)
wait_for_completion(&evt_struct->comp);
dma_unmap_single(hostdata->dev, addr, length, DMA_BIDIRECTIONAL);
_
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/5] ibmvscsi: Abort path fix

2007-06-13 Thread Brian King

Since it is completely possible for scsi core to call 
a LLDD's eh_abort function after the command has completed,
fix ibmvscsi to return SUCCESS if this is the case.

Signed-off-by: Brian King <[EMAIL PROTECTED]>
---

 linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_abort_fix 
drivers/scsi/ibmvscsi/ibmvscsi.c
--- linux-2.6/drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_abort_fix   
2007-06-12 14:50:50.0 -0500
+++ linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c  2007-06-12 
14:50:50.0 -0500
@@ -1018,7 +1018,7 @@ static int ibmvscsi_eh_abort_handler(str
 
if (!found_evt) {
spin_unlock_irqrestore(hostdata->host->host_lock, flags);
-   return FAILED;
+   return SUCCESS;
}
 
evt = get_event_struct(&hostdata->pool);
_
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/5] ibmvscsi: Add eh_host_reset_handler

2007-06-13 Thread Jeff Garzik

Brian King wrote:

+   spin_lock_irqsave(hostdata->host->host_lock, flags);
+   list_for_each_entry_safe(tmp_evt, pos, &hostdata->sent, list) {
+   list_del(&tmp_evt->list);
+   del_timer(&tmp_evt->timer);
+   if (tmp_evt->cmnd) {
+   tmp_evt->cmnd->result = (error_code << 16);
+   unmap_cmd_data(&tmp_evt->iu.srp.cmd,
+  tmp_evt,
+  tmp_evt->hostdata->dev);
+   if (tmp_evt->cmnd_done)
+   tmp_evt->cmnd_done(tmp_evt->cmnd);
+   } else if (tmp_evt->done)
+   tmp_evt->done(tmp_evt);
+   free_event_struct(&tmp_evt->hostdata->pool, tmp_evt);
+   }
+   spin_unlock_irqrestore(hostdata->host->host_lock, flags);



Since it's been so long since I bothered with the old-style error 
handling, a dumb question:


Are you sure that you should be completing the commands in the host 
reset handler?  I thought EH took care of that, and your sole task in 
the host reset handler was to reset everything attached to a single 
scsi_host.


Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/5] ibmvscsi: Remove unnecessary map_sg check

2007-06-13 Thread Jeff Garzik

Brian King wrote:

Since sg_tablesize is set appropriately in the scsi host template,
remove the unnecessary check to make sure it is not exceeded
following the dma_map_sg call.

Signed-off-by: Brian King <[EMAIL PROTECTED]>
---

 linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c |7 ---
 1 file changed, 7 deletions(-)


Patches 1-5 look OK to me... modulo the question I just sent


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] mpt fusion: update MAINTAINERS

2007-06-13 Thread Eric Moore
LSI has a new distribution list for linux support and associated inquires.  The 
previous list at [EMAIL PROTECTED] has been deleted.  I will continue 
maintaining this driver, as well as others at LSI.

Signed-off-by: Eric Moore <[EMAIL PROTECTED]>

--- b/MAINTAINERS   2007-06-12 12:21:42.0 -0600
+++ a/MAINTAINERS   2007-06-13 14:38:30.0 -0600
@@ -2277,11 +2277,10 @@ L:  [EMAIL PROTECTED]
 W: http://www.linux-ntfs.org/content/view/19/37/
 S: Maintained
 
-LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
-P: Eric Moore
-M: [EMAIL PROTECTED]
+LSI MPT FUSION DRIVERS (FC/SAS/SPI)
+P: MPT Fusion Linux Team
+M: [EMAIL PROTECTED]
 M: [EMAIL PROTECTED]
-L: [EMAIL PROTECTED]
 L: linux-scsi@vger.kernel.org
 W: http://www.lsilogic.com/support
 S: Supported
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/6] mpt fusion: update MAINTAINERS (fusion part)

2007-06-13 Thread Eric Moore
Update assocated fusion sources with new support email address.

Signed-off-by: Eric Moore <[EMAIL PROTECTED]>


diff -uarpN b/drivers/message/fusion/mptbase.c 
a/drivers/message/fusion/mptbase.c
--- b/drivers/message/fusion/mptbase.c  2007-06-12 12:21:58.0 -0600
+++ a/drivers/message/fusion/mptbase.c  2007-06-13 14:46:35.0 -0600
@@ -6,7 +6,7 @@
  *  running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
  *  Copyright (c) 1999-2007 LSI Logic Corporation
- *  (mailto:[EMAIL PROTECTED])
+ *  (mailto:[EMAIL PROTECTED])
  *
  */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff -uarpN b/drivers/message/fusion/mptbase.h 
a/drivers/message/fusion/mptbase.h
--- b/drivers/message/fusion/mptbase.h  2007-06-12 12:21:58.0 -0600
+++ a/drivers/message/fusion/mptbase.h  2007-06-13 14:47:25.0 -0600
@@ -6,7 +6,7 @@
  *  running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
  *  Copyright (c) 1999-2007 LSI Logic Corporation
- *  (mailto:[EMAIL PROTECTED])
+ *  (mailto:[EMAIL PROTECTED])
  *
  */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff -uarpN b/drivers/message/fusion/mptctl.c a/drivers/message/fusion/mptctl.c
--- b/drivers/message/fusion/mptctl.c   2007-04-25 21:08:32.0 -0600
+++ a/drivers/message/fusion/mptctl.c   2007-06-13 14:46:24.0 -0600
@@ -5,7 +5,7 @@
  *  running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
  *  Copyright (c) 1999-2007 LSI Logic Corporation
- *  (mailto:[EMAIL PROTECTED])
+ *  (mailto:[EMAIL PROTECTED])
  *
  */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff -uarpN b/drivers/message/fusion/mptctl.h a/drivers/message/fusion/mptctl.h
--- b/drivers/message/fusion/mptctl.h   2007-04-25 21:08:32.0 -0600
+++ a/drivers/message/fusion/mptctl.h   2007-06-13 14:47:14.0 -0600
@@ -6,7 +6,7 @@
  *  running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
  *  Copyright (c) 1999-2007 LSI Logic Corporation
- *  (mailto:[EMAIL PROTECTED])
+ *  (mailto:[EMAIL PROTECTED])
  *
  */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff -uarpN b/drivers/message/fusion/mptfc.c a/drivers/message/fusion/mptfc.c
--- b/drivers/message/fusion/mptfc.c2007-04-25 21:08:32.0 -0600
+++ a/drivers/message/fusion/mptfc.c2007-06-13 14:46:14.0 -0600
@@ -4,7 +4,7 @@
  *  running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
  *  Copyright (c) 1999-2007 LSI Logic Corporation
- *  (mailto:[EMAIL PROTECTED])
+ *  (mailto:[EMAIL PROTECTED])
  *
  */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff -uarpN b/drivers/message/fusion/mptlan.c a/drivers/message/fusion/mptlan.c
--- b/drivers/message/fusion/mptlan.c   2007-06-12 12:21:58.0 -0600
+++ a/drivers/message/fusion/mptlan.c   2007-06-13 14:46:03.0 -0600
@@ -5,7 +5,7 @@
  *  running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
  *  Copyright (c) 2000-2007 LSI Logic Corporation
- *  (mailto:[EMAIL PROTECTED])
+ *  (mailto:[EMAIL PROTECTED])
  *
  */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff -uarpN b/drivers/message/fusion/mptlan.h a/drivers/message/fusion/mptlan.h
--- b/drivers/message/fusion/mptlan.h   2007-04-25 21:08:32.0 -0600
+++ a/drivers/message/fusion/mptlan.h   2007-06-13 14:46:58.0 -0600
@@ -5,7 +5,7 @@
  *  running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
  *  Copyright (c) 2000-2007 LSI Logic Corporation
- *  (mailto:[EMAIL PROTECTED])
+ *  (mailto:[EMAIL PROTECTED])
  *
  */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff -uarpN b/drivers/message/fusion/mptsas.c a/drivers/message/fusion/mptsas.c
--- b/drivers/message/fusion/mptsas.c   2007-04-25 21:08:32.0 -0600
+++ a/drivers/message/fusion/mptsas.c   2007-06-13 14:45:53.0 -0600
@@ -4,7 +4,7 @@
  *  running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
  *  Copyright (c) 1999-2007 LSI Logic Corporation
- *  (mailto:[EMAIL PROTECTED])
+ *  (mailto:[EMAIL PROTECTED])
  *  Copyright (c) 2005-2007 Dell
  */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff -uarpN b/drivers/message/fusion/mptscsih.c 
a/drivers/message/fusion/mptscsih.c
--- b/drivers/message/fusion/mptscsih.c 2007-06-13 11:47:05.0 -0600
+++ a/drivers/message/fusion/mptscsih.c 2007-06-13 14:45:42.0 -0600
@@ -4,7 +4,7 @@
  *  running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
  *  Copyright (c) 1999-2007 LSI Logic Corporation
- *  (mailto:[EMAIL PROTECTED])
+ *  (mailto:[EMAIL PROTECTED])
  *
  */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff -uarpN b/drivers/message/fusion/mpts

[PATCH 2/6] mpt fusion: new mpi headers version 1.5.16

2007-06-13 Thread Eric Moore
mpi header update

Signed-off-by: Eric Moore <[EMAIL PROTECTED]>


diff -uarpN b/drivers/message/fusion/lsi/mpi.h 
a/drivers/message/fusion/lsi/mpi.h
--- b/drivers/message/fusion/lsi/mpi.h  2007-04-25 21:08:32.0 -0600
+++ a/drivers/message/fusion/lsi/mpi.h  2007-06-12 15:29:07.0 -0600
@@ -1,12 +1,12 @@
 /*
- *  Copyright (c) 2000-2006 LSI Logic Corporation.
+ *  Copyright (c) 2000-2007 LSI Logic Corporation.
  *
  *
  *   Name:  mpi.h
  *  Title:  MPI Message independent structures and definitions
  *  Creation Date:  July 27, 2000
  *
- *mpi.h Version:  01.05.12
+ *mpi.h Version:  01.05.13
  *
  *  Version History
  *  ---
@@ -78,6 +78,7 @@
  *  08-30-05  01.05.10  Added 2 new IOCStatus codes for Target.
  *  03-27-06  01.05.11  Bumped MPI_HEADER_VERSION_UNIT.
  *  10-11-06  01.05.12  Bumped MPI_HEADER_VERSION_UNIT.
+ *  05-24-07  01.05.13  Bumped MPI_HEADER_VERSION_UNIT.
  *  --
  */
 
@@ -108,7 +109,7 @@
 /* Note: The major versions of 0xe0 through 0xff are reserved */
 
 /* versioning for this MPI header set */
-#define MPI_HEADER_VERSION_UNIT (0x0E)
+#define MPI_HEADER_VERSION_UNIT (0x10)
 #define MPI_HEADER_VERSION_DEV  (0x00)
 #define MPI_HEADER_VERSION_UNIT_MASK(0xFF00)
 #define MPI_HEADER_VERSION_UNIT_SHIFT   (8)
diff -uarpN b/drivers/message/fusion/lsi/mpi_cnfg.h 
a/drivers/message/fusion/lsi/mpi_cnfg.h
--- b/drivers/message/fusion/lsi/mpi_cnfg.h 2007-04-25 21:08:32.0 
-0600
+++ a/drivers/message/fusion/lsi/mpi_cnfg.h 2007-06-12 15:29:07.0 
-0600
@@ -1,12 +1,12 @@
 /*
- *  Copyright (c) 2000-2006 LSI Logic Corporation.
+ *  Copyright (c) 2000-2007 LSI Logic Corporation.
  *
  *
  *   Name:  mpi_cnfg.h
  *  Title:  MPI Config message, structures, and Pages
  *  Creation Date:  July 27, 2000
  *
- *mpi_cnfg.h Version:  01.05.13
+ *mpi_cnfg.h Version:  01.05.15
  *
  *  Version History
  *  ---
@@ -293,6 +293,21 @@
  *  Added more AccessStatus values for SAS Device Page 0.
  *  Added bit for SATA Asynchronous Notification Support in
  *  Flags field of SAS Device Page 0.
+ *  02-28-07  01.05.14  Added ExtFlags field to Manufacturing Page 4.
+ *  Added Disable SMART Polling for CapabilitiesFlags of
+ *  IOC Page 6.
+ *  Added Disable SMART Polling to DeviceSettings of BIOS
+ *  Page 1.
+ *  Added Multi-Port Domain bit for DiscoveryStatus field
+ *  of SAS IO Unit Page.
+ *  Added Multi-Port Domain Illegal flag for SAS IO Unit
+ *  Page 1 AdditionalControlFlags field.
+ *  05-24-07  01.05.15  Added Hide Physical Disks with Non-Integrated RAID
+ *  Metadata bit to Manufacturing Page 4 ExtFlags field.
+ *  Added Internal Connector to End Device Present bit to
+ *  Expander Page 0 Flags field.
+ *  Fixed define for
+ *  MPI_SAS_EXPANDER1_DISCINFO_BAD_PHY_DISABLED.
  *  --
  */
 
@@ -639,7 +654,7 @@ typedef struct _CONFIG_PAGE_MANUFACTURIN
 U8  InfoSize1;  /* 0Bh */
 U8  InquirySize;/* 0Ch */
 U8  Flags;  /* 0Dh */
-U16 Reserved2;  /* 0Eh */
+U16 ExtFlags;   /* 0Eh */
 U8  InquiryData[56];/* 10h */
 U32 ISVolumeSettings;   /* 48h */
 U32 IMEVolumeSettings;  /* 4Ch */
@@ -658,7 +673,7 @@ typedef struct _CONFIG_PAGE_MANUFACTURIN
 } CONFIG_PAGE_MANUFACTURING_4, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_4,
   ManufacturingPage4_t, MPI_POINTER pManufacturingPage4_t;
 
-#define MPI_MANUFACTURING4_PAGEVERSION  (0x04)
+#define MPI_MANUFACTURING4_PAGEVERSION  (0x05)
 
 /* defines for the Flags field */
 #define MPI_MANPAGE4_FORCE_BAD_BLOCK_TABLE  (0x80)
@@ -670,6 +685,12 @@ typedef struct _CONFIG_PAGE_MANUFACTURIN
 #define MPI_MANPAGE4_IM_RESYNC_CACHE_ENABLE (0x02)
 #define MPI_MANPAGE4_IR_NO_MIX_SAS_SATA (0x01)
 
+/* defines for the ExtFlags field */
+#define MPI_MANPAGE4_EXTFLAGS_HIDE_NON_IR_METADATA  (0x0008)
+#define MPI_MANPAGE4_EXTFLAGS_SAS_CACHE_DISABLE (0x0004)
+#define MPI_MANPAGE4_EXTFLAGS_SATA_CACHE_DISABLE(0x0002)
+#define MPI_MANPAGE4_EXTFLAGS_LEGACY_MODE   (0x0001)
+
 
 #ifndef MPI_MANPAGE5_NUM_FORCEWWID
 #define MPI_MANPAGE5_NUM_FORCEWWID  (1)
@@ -781,7 +802,7 @@ typedef struct _CONF

[PATCH 3/6] mpt fusion: remove unused header - mpi_inb.h

2007-06-13 Thread Eric Moore
fc inband managment header deleted

Signed-off-by: Eric Moore <[EMAIL PROTECTED]>

diff -uarpN b/drivers/message/fusion/lsi/mpi_inb.h 
a/drivers/message/fusion/lsi/mpi_inb.h
--- b/drivers/message/fusion/lsi/mpi_inb.h  2007-06-12 15:29:07.0 
-0600
+++ a/drivers/message/fusion/lsi/mpi_inb.h  1969-12-31 17:00:00.0 
-0700
@@ -1,221 +0,0 @@
-/*
- *  Copyright (c) 2003-2004 LSI Logic Corporation.
- *
- *
- *   Name:  mpi_inb.h
- *  Title:  MPI Inband structures and definitions
- *  Creation Date:  September 30, 2003
- *
- *mpi_inb.h Version:  01.05.01
- *
- *  Version History
- *  ---
- *
- *  Date  Version   Description
- *      --
- *  05-11-04  01.03.01  Original release.
- *  08-19-04  01.05.01  Original release for MPI v1.5.
- *  --
- */
-
-#ifndef MPI_INB_H
-#define MPI_INB_H
-
-/**
-*
-*I n b a n dM e s s a g e s
-*
-***/
-
-
-//
-/* Inband Buffer Post Request   */
-//
-
-typedef struct _MSG_INBAND_BUFFER_POST_REQUEST
-{
-U8  Reserved1;  /* 00h */
-U8  BufferCount;/* 01h */
-U8  ChainOffset;/* 02h */
-U8  Function;   /* 03h */
-U16 Reserved2;  /* 04h */
-U8  Reserved3;  /* 06h */
-U8  MsgFlags;   /* 07h */
-U32 MsgContext; /* 08h */
-U32 Reserved4;  /* 0Ch */
-SGE_TRANS_SIMPLE_UNION  SGL;/* 10h */
-} MSG_INBAND_BUFFER_POST_REQUEST, MPI_POINTER 
PTR_MSG_INBAND_BUFFER_POST_REQUEST,
-  MpiInbandBufferPostRequest_t , MPI_POINTER pMpiInbandBufferPostRequest_t;
-
-
-typedef struct _WWN_FC_FORMAT
-{
-U64 NodeName;   /* 00h */
-U64 PortName;   /* 08h */
-} WWN_FC_FORMAT, MPI_POINTER PTR_WWN_FC_FORMAT,
-  WwnFcFormat_t, MPI_POINTER pWwnFcFormat_t;
-
-typedef struct _WWN_SAS_FORMAT
-{
-U64 WorldWideID;/* 00h */
-U32 Reserved1;  /* 08h */
-U32 Reserved2;  /* 0Ch */
-} WWN_SAS_FORMAT, MPI_POINTER PTR_WWN_SAS_FORMAT,
-  WwnSasFormat_t, MPI_POINTER pWwnSasFormat_t;
-
-typedef union _WWN_INBAND_FORMAT
-{
-WWN_FC_FORMAT   Fc;
-WWN_SAS_FORMAT  Sas;
-} WWN_INBAND_FORMAT, MPI_POINTER PTR_WWN_INBAND_FORMAT,
-  WwnInbandFormat, MPI_POINTER pWwnInbandFormat;
-
-
-/* Inband Buffer Post reply message */
-
-typedef struct _MSG_INBAND_BUFFER_POST_REPLY
-{
-U16 Reserved1;  /* 00h */
-U8  MsgLength;  /* 02h */
-U8  Function;   /* 03h */
-U16 Reserved2;  /* 04h */
-U8  Reserved3;  /* 06h */
-U8  MsgFlags;   /* 07h */
-U32 MsgContext; /* 08h */
-U16 Reserved4;  /* 0Ch */
-U16 IOCStatus;  /* 0Eh */
-U32 IOCLogInfo; /* 10h */
-U32 TransferLength; /* 14h */
-U32 TransactionContext; /* 18h */
-WWN_INBAND_FORMAT   Wwn;/* 1Ch */
-U32 IOCIdentifier[4];   /* 2Ch */
-} MSG_INBAND_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_INBAND_BUFFER_POST_REPLY,
-  MpiInbandBufferPostReply_t, MPI_POINTER pMpiInbandBufferPostReply_t;
-
-
-//
-/* Inband Send Request  */
-//
-
-typedef struct _MSG_INBAND_SEND_REQUEST
-{
-U16 Reserved1;  /* 00h */
-U8  ChainOffset;/* 02h */
-U8  Function;   /* 03h */
-U16 Reserved2;  /* 04h */
-U8  Reserved3;  /* 06h */
-U8  MsgFlags;   /* 07h */
-U32 MsgContext; /* 08h */
-U32 Reserved4;  /* 0Ch */
-WWN_INBAND_FORMAT   Wwn;/* 10h */
-U32 Reserved5;  /* 20h */
-SGE_IO_UNION  

[PATCH 4/6] mpt fusion: remove unused header - linux_compat.h

2007-06-13 Thread Eric Moore
remove unused header

Signed-off-by: Eric Moore <[EMAIL PROTECTED]>

diff -uarpN b/drivers/message/fusion/linux_compat.h 
a/drivers/message/fusion/linux_compat.h
--- b/drivers/message/fusion/linux_compat.h 2007-04-25 21:08:32.0 
-0600
+++ a/drivers/message/fusion/linux_compat.h 1969-12-31 17:00:00.0 
-0700
@@ -1,9 +0,0 @@
-/* drivers/message/fusion/linux_compat.h */
-
-#ifndef FUSION_LINUX_COMPAT_H
-#define FUSION_LINUX_COMPAT_H
-
-#include 
-#include 
-
-#endif /* _LINUX_COMPAT_H */
diff -uarpN b/drivers/message/fusion/mptfc.c a/drivers/message/fusion/mptfc.c
--- b/drivers/message/fusion/mptfc.c2007-06-13 14:46:14.0 -0600
+++ a/drivers/message/fusion/mptfc.c2007-06-13 15:36:48.0 -0600
@@ -43,7 +43,6 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-#include "linux_compat.h"  /* linux-2.6 tweaks */
 #include 
 #include 
 #include 
diff -uarpN b/drivers/message/fusion/mptscsih.c 
a/drivers/message/fusion/mptscsih.c
--- b/drivers/message/fusion/mptscsih.c 2007-06-13 14:45:42.0 -0600
+++ a/drivers/message/fusion/mptscsih.c 2007-06-13 15:37:26.0 -0600
@@ -44,7 +44,6 @@
 */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 
-#include "linux_compat.h"  /* linux-2.6 tweaks */
 #include 
 #include 
 #include 
diff -uarpN b/drivers/message/fusion/mptspi.c a/drivers/message/fusion/mptspi.c
--- b/drivers/message/fusion/mptspi.c   2007-06-13 14:45:25.0 -0600
+++ a/drivers/message/fusion/mptspi.c   2007-06-13 15:37:47.0 -0600
@@ -44,7 +44,6 @@
 */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 
-#include "linux_compat.h"  /* linux-2.6 tweaks */
 #include 
 #include 
 #include 
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/6] mpt fusion: fc loginfo using defines from the header

2007-06-13 Thread Eric Moore
rewrite of  mpt_fc_log_info to use the enum/defines from mpi_log_fc.h

Signed-off-by: Eric Moore <[EMAIL PROTECTED]>

diff -uarpN b/drivers/message/fusion/mptbase.c 
a/drivers/message/fusion/mptbase.c
--- b/drivers/message/fusion/mptbase.c  2007-06-13 14:46:35.0 -0600
+++ a/drivers/message/fusion/mptbase.c  2007-06-13 15:39:17.0 -0600
@@ -64,6 +64,7 @@
 #endif
 
 #include "mptbase.h"
+#include "lsi/mpi_log_fc.h"
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 #define my_NAME"Fusion MPT base driver"
@@ -6349,14 +6350,37 @@ ProcessEventNotification(MPT_ADAPTER *io
 static void
 mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info)
 {
-   static char *subcl_str[8] = {
-   "FCP Initiator", "FCP Target", "LAN", "MPI Message Layer",
-   "FC Link", "Context Manager", "Invalid Field Offset", "State 
Change Info"
-   };
-   u8 subcl = (log_info >> 24) & 0x7;
+   char *desc = "unknown";
+
+   switch (log_info & 0xFF00) {
+   case MPI_IOCLOGINFO_FC_INIT_BASE:
+   desc = "FCP Initiator";
+   break;
+   case MPI_IOCLOGINFO_FC_TARGET_BASE:
+   desc = "FCP Target";
+   break;
+   case MPI_IOCLOGINFO_FC_LAN_BASE:
+   desc = "LAN";
+   break;
+   case MPI_IOCLOGINFO_FC_MSG_BASE:
+   desc = "MPI Message Layer";
+   break;
+   case MPI_IOCLOGINFO_FC_LINK_BASE:
+   desc = "FC Link";
+   break;
+   case MPI_IOCLOGINFO_FC_CTX_BASE:
+   desc = "Context Manager";
+   break;
+   case MPI_IOCLOGINFO_FC_INVALID_FIELD_BYTE_OFFSET:
+   desc = "Invalid Field Offset";
+   break;
+   case MPI_IOCLOGINFO_FC_STATE_CHANGE:
+   desc = "State Change Info";
+   break;
+   }
 
-   printk(MYIOC_s_INFO_FMT "LogInfo(0x%08x): SubCl={%s}\n",
-   ioc->name, log_info, subcl_str[subcl]);
+   printk(MYIOC_s_INFO_FMT "LogInfo(0x%08x): SubClass={%s}, 
Value=(0x%06x)\n",
+   ioc->name, log_info, desc, (log_info & 0xFF));
 }
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 6/6] mpt fusion: bump version

2007-06-13 Thread Eric Moore
bump version

Signed-off-by: Eric Moore <[EMAIL PROTECTED]>

diff -uarpN b/drivers/message/fusion/mptbase.h 
a/drivers/message/fusion/mptbase.h
--- b/drivers/message/fusion/mptbase.h  2007-06-13 15:36:18.0 -0600
+++ a/drivers/message/fusion/mptbase.h  2007-06-13 15:40:23.0 -0600
@@ -75,8 +75,8 @@
 #define COPYRIGHT  "Copyright (c) 1999-2007 " MODULEAUTHOR
 #endif
 
-#define MPT_LINUX_VERSION_COMMON   "3.04.04"
-#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.04"
+#define MPT_LINUX_VERSION_COMMON   "3.04.05"
+#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.05"
 #define WHAT_MAGIC_STRING  "@" "(" "#" ")"
 
 #define show_mptmod_ver(s,ver)  \
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SG TUR and AIO

2007-06-13 Thread Christophe Varoqui
Hi,

I'm trying to make multipath daemon checking asynchronous, and most path
checkers use SG. Please bare with some questions on this wild wild topic
(to search engine criteria).

Is it possible to submit through AIO (libaio API) any SG command forged
with struct sg_io_hdr ?

I've seen the INQ example in the sg3_utils package, so I guess it should
work there. But what about "Test Unit Ready" command ?

Also why in the example, only the SG IO write is asynchronous ? Is the
inquiry response read qaranteed to be non-blocking ? Would an pread io
work at all ?

Is there other pointers to code snippets showing these two subsystems
together ?

Thanks for your advices,
cvaroqui

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] qla4xxx: allow hba to be online when initiator ip address is uninitialized

2007-06-13 Thread Mike Christie
David C Somayajulu wrote:
> On Fri, 2007-06-08 at 17:29 -0700, David C Somayajulu wrote:
>> This patch provides the following:
>> 1. remove warning ignoring the return value of pci_set_mwi()
>> 2. allows HBA to be online when the initiator ip address is uninitialized.
> Including 
> 
> Signed-off-by: David Somayajulu <[EMAIL PROTECTED]>
> 
>  drivers/scsi/qla4xxx/ql4_init.c |   23 +++
>  1 files changed, 11 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
> index d8c064c..1e29f51 100644
> --- a/drivers/scsi/qla4xxx/ql4_init.c
> +++ b/drivers/scsi/qla4xxx/ql4_init.c
> @@ -883,11 +883,12 @@ static int qla4xxx_config_nvram(struct s
>  static void qla4x00_pci_config(struct scsi_qla_host *ha)
>  {
>   uint16_t w;
> + int status;
>  
>   dev_info(&ha->pdev->dev, "Configuring PCI space...\n");
>  
>   pci_set_master(ha->pdev);
> - pci_set_mwi(ha->pdev);
> + status = pci_set_mwi(ha->pdev);


It looks ok, but creating the status variable and setting it like this,
just to quiet the compile warning, and never doing anything else with it
doesn't seem nice.
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html