queued patches for SCSI for 2.6.24

Previous thread: [PATCH] fix sctp_del_bind_addr() last argument type by Al Viro on Tuesday, September 25, 2007 - 8:54 pm. (1 message)

Next thread: [PATCH] - drivers/hid/hid-debug.c - trivial - add KERN_DEBUG prefix, fix typo, constify by Joe Perches on Tuesday, September 25, 2007 - 9:44 pm. (2 messages)
To: Andrew Morton <akpm@...>
Cc: linux-scsi <linux-scsi@...>, linux-kernel <linux-kernel@...>
Date: Tuesday, September 25, 2007 - 9:00 pm

Andrew asked that I provide a status report of pending updates. The
list is attached below. It's pretty much driver updates and minor bug
fixes. The main functionality changes are Kay's sysfs updates and the
shift of the ULD attachement towards the block prep function.

James

---

Adrian Bunk (2):
make scsi_decode_sense_buffer and scsi_decode_sense_extras static
scsi_error.c should #include "scsi_transport_api.h"

Alan Cox (3):
dtc: Fix typo
eata_pio: Clean up proc handling, bracketing and use cpu_relax()
dtc: clean up indent damage and add printk levels

Andrew Morton (3):
ips: warning fix
aacraid: rename check_reset
bsg: declare structures for the non BSG case

Andrew Vasquez (15):
qla2xxx: Update version number to 8.02.00-k4.
qla2xxx: Limit iIDMA speed adjustments.
qla2xxx: Rework MSI-X handlers.
qla2xxx: Clear options-flags while staging firmware-execution.
qla2xxx: Sparse cleanups in qla_mid.c
qla2xxx: Cleanup several 'sparse' warnings.
qla2xxx: Use shost_priv().
qla2xxx: Remove unused member (list) from srb_t structure.
qla2xxx: Use the correct pointer-address during NVRAM writes.
qla2xxx: Set correct attribute count during FDMI RPA.
qla2xxx: Query additional RISC registers during ISP25XX firmware dump.
qla2xxx: Correct staging of RISC while attempting to pause.
qla2xxx: Query additional RISC information during a pause.
qla2xxx: Add flash burst-read/write support.
qla2xxx: Collapse and simplify ISP2XXX firmware dump routines.

Bartlomiej Zolnierkiewicz (1):
MAINTAINERS: mark ide-scsi as Orphan

Bernhard Walle (1):
ips: Update version information

Boaz Harrosh (2):
ide-scsi.: convert to data accessors and !use_sg cleanup
microtek: use data accessors and !use_sg cleanup

Christof Schmitt (5):
zfcp: Enable debug feature before setting adapter online
scsi_transport_fc: Introduce disa...

To: <James.Bottomley@...>
Cc: <akpm@...>, <linux-scsi@...>, <linux-kernel@...>, <fujita.tomonori@...>
Date: Tuesday, September 25, 2007 - 9:28 pm

On Tue, 25 Sep 2007 20:00:02 -0500

Can we make new 'supporrted_mode' and 'active_mode' attributes look
better?

http://marc.info/?l=linux-scsi&m=118991196128245&w=2
-

To: FUJITA Tomonori <tomof@...>
Cc: <akpm@...>, <linux-scsi@...>, <linux-kernel@...>, <fujita.tomonori@...>
Date: Tuesday, September 25, 2007 - 9:42 pm

Sure, but Jeff's suggestion was a good one to avoid me having to change
hundreds of files. Could you roll it up and resubmit?

James

-

To: <James.Bottomley@...>
Cc: <tomof@...>, <akpm@...>, <linux-scsi@...>, <linux-kernel@...>, <fujita.tomonori@...>
Date: Tuesday, September 25, 2007 - 10:12 pm

On Tue, 25 Sep 2007 20:42:35 -0500

This can be cleanly applied to scsi-misc.

-
From: FUJITA Tomonori <tomof@acm.org>
Subject: [PATCH] set supported_mode to MODE_INITIATOR by default

This sets supported_mode to MODE_INITIATOR if a lld doesn't specify
supported_mode in scsi_host_template.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
drivers/scsi/hosts.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index adc9559..694015d 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -342,6 +342,10 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
shost->unchecked_isa_dma = sht->unchecked_isa_dma;
shost->use_clustering = sht->use_clustering;
shost->ordered_tag = sht->ordered_tag;
+
+ if (!sht->supported_mode)
+ sht->supported_mode = MODE_INITIATOR;
+
shost->active_mode = sht->supported_mode;

if (sht->max_host_blocked)
--
1.5.2.4

-

To: FUJITA Tomonori <tomof@...>, <James.Bottomley@...>
Cc: <akpm@...>, <linux-scsi@...>, <linux-kernel@...>, <fujita.tomonori@...>
Date: Tuesday, September 25, 2007 - 10:37 pm

I almost hesitate to speak up, after making the original suggestion, but:

Are there any const-ness worries for scsi_host_template, or plans for
the future? I do not see any other examples of the host template
members getting modified.

Perhaps this value should instead be mirrored in scsi_host, like many
others?

Jeff

-

To: <jeff@...>
Cc: <tomof@...>, <James.Bottomley@...>, <akpm@...>, <linux-scsi@...>, <linux-kernel@...>, <fujita.tomonori@...>
Date: Tuesday, September 25, 2007 - 10:52 pm

On Tue, 25 Sep 2007 22:37:33 -0400

Yeah, that's why I said it's hacky in the previous
discussion. Changing scsi_host_template behind llds is not nice, I

supported_mode should be static like 'name'. I'm not sure about having
supported_mode in scsi_host. All the scsi_hosts of one driver always
use the same supported_mode value unlike active_mode.
-

To: Jeff Garzik <jeff@...>
Cc: FUJITA Tomonori <tomof@...>, <James.Bottomley@...>, <akpm@...>, <linux-scsi@...>, <linux-kernel@...>, <fujita.tomonori@...>
Date: Tuesday, September 25, 2007 - 10:56 pm

Goodness, Jeff, you haven't looked too hard. There's dozens of examples
I've come across trawling the horrible unmaintained drivers. I'd love
to see scsi_host_template become const, but it's not happening any time
soon, and we can address this little piece when the time comes.

--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
-

To: Matthew Wilcox <matthew@...>
Cc: FUJITA Tomonori <tomof@...>, <James.Bottomley@...>, <akpm@...>, <linux-scsi@...>, <linux-kernel@...>, <fujita.tomonori@...>
Date: Tuesday, September 25, 2007 - 11:34 pm

Well, sure, the driver is the owner of that memory.

We're talking about common code.

If everybody agrees SHT is R/W in the core, Fujita-san's patch is fine.

Jeff

-

To: Jeff Garzik <jeff@...>
Cc: Matthew Wilcox <matthew@...>, FUJITA Tomonori <tomof@...>, <akpm@...>, <linux-scsi@...>, <linux-kernel@...>, <fujita.tomonori@...>
Date: Tuesday, September 25, 2007 - 11:45 pm

Well, I don't like mucking with the template either.

This whole mess is generated basically because the zero default of the
template should be treated as initiator. How about this, which makes
that manifest?

James

diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index adc9559..7e26440 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -342,7 +342,11 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
shost->unchecked_isa_dma = sht->unchecked_isa_dma;
shost->use_clustering = sht->use_clustering;
shost->ordered_tag = sht->ordered_tag;
- shost->active_mode = sht->supported_mode;
+ if (sht->supported_mode == MODE_UNKNOWN)
+ /* means we didn't set it ... default to INITIATOR */
+ shost->active_mode = MODE_INITIATOR;
+ else
+ shost->active_mode = sht->supported_mode;

if (sht->max_host_blocked)
shost->max_host_blocked = sht->max_host_blocked;
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 0088c4d..4965e9e 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -209,11 +209,13 @@ show_shost_mode(unsigned int mode, char *buf)
static ssize_t show_shost_supported_mode(struct class_device *class_dev, char *buf)
{
struct Scsi_Host *shost = class_to_shost(class_dev);
+ unsigned int supported_mode = shost->hostt->supported_mode;

- if (shost->hostt->supported_mode == MODE_UNKNOWN)
- return snprintf(buf, 20, "unknown\n");
- else
- return show_shost_mode(shost->hostt->supported_mode, buf);
+ if (supported_mode == MODE_UNKNOWN)
+ /* by default this should be initiator */
+ supported_mode = MODE_INITIATOR;
+
+ return show_shost_mode(shost->hostt->supported_mode, buf);
}

static CLASS_DEVICE_ATTR(supported_mode, S_IRUGO | S_IWUSR, show_shost_supported_mode, NULL);

-

To: <James.Bottomley@...>
Cc: <jeff@...>, <matthew@...>, <tomof@...>, <akpm@...>, <linux-scsi@...>, <linux-kernel@...>, <fujita.tomonori@...>
Date: Wednesday, September 26, 2007 - 12:56 am

On Tue, 25 Sep 2007 22:45:53 -0500

should be:

-

To: FUJITA Tomonori <tomof@...>
Cc: <jeff@...>, <matthew@...>, <akpm@...>, <linux-scsi@...>, <linux-kernel@...>, <fujita.tomonori@...>
Date: Wednesday, September 26, 2007 - 10:07 am

Yes, sorry ... code in haste etc.

James

-

To: <James.Bottomley@...>
Cc: <jeff@...>, <matthew@...>, <tomof@...>, <akpm@...>, <linux-scsi@...>, <linux-kernel@...>, <fujita.tomonori@...>
Date: Tuesday, September 25, 2007 - 11:55 pm

On Tue, 25 Sep 2007 22:45:53 -0500

But how can we handle dual-mode drivers?

luce:/sys/class/scsi_host/host0$ cat supported_mode
Initiator, Target

The values are not enumerated. They are like FC_PORT_ROLE.
-

To: FUJITA Tomonori <tomof@...>
Cc: <jeff@...>, <matthew@...>, <akpm@...>, <linux-scsi@...>, <linux-kernel@...>, <fujita.tomonori@...>
Date: Wednesday, September 26, 2007 - 12:01 am

Any driver that does other than the default INITIATOR has to set it in
the template. The code only defaults zero (which is what the templates
get if its unset) to MODE_INITIATOR.

James

-

To: <James.Bottomley@...>
Cc: <tomof@...>, <jeff@...>, <matthew@...>, <akpm@...>, <linux-scsi@...>, <linux-kernel@...>, <fujita.tomonori@...>
Date: Wednesday, September 26, 2007 - 12:10 am

On Tue, 25 Sep 2007 23:01:53 -0500

Oh yeah, the patch is fine.

I just wanted to say that supported_mode/active_mode are designed not
to be enumerated and we can't just set INITIATOR to zero and TARGET to
non-zero.
-

To: James Bottomley <James.Bottomley@...>
Cc: Matthew Wilcox <matthew@...>, FUJITA Tomonori <tomof@...>, <akpm@...>, <linux-scsi@...>, <linux-kernel@...>, <fujita.tomonori@...>
Date: Tuesday, September 25, 2007 - 11:55 pm

ACK

-

To: Jeff Garzik <jeff@...>
Cc: FUJITA Tomonori <tomof@...>, <James.Bottomley@...>, <akpm@...>, <linux-scsi@...>, <linux-kernel@...>, <fujita.tomonori@...>
Date: Tuesday, September 25, 2007 - 11:38 pm

Oh ... harder to find, but scsi_module.c does that, as does
scsi_register/scsi_unregister. OK, those are legacy, but they still
exist today.

--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
-

To: <James.Bottomley@...>
Cc: <akpm@...>, <linux-scsi@...>, <linux-kernel@...>
Date: Tuesday, September 25, 2007 - 9:05 pm

From: James Bottomley <James.Bottomley@SteelEye.com>

I'd like to request that this one goes into 2.6.23 as
it is a bug fix and the bug confuses users.

Thanks.
-

Previous thread: [PATCH] fix sctp_del_bind_addr() last argument type by Al Viro on Tuesday, September 25, 2007 - 8:54 pm. (1 message)

Next thread: [PATCH] - drivers/hid/hid-debug.c - trivial - add KERN_DEBUG prefix, fix typo, constify by Joe Perches on Tuesday, September 25, 2007 - 9:44 pm. (2 messages)