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 levelsAndrew Morton (3):
ips: warning fix
aacraid: rename check_reset
bsg: declare structures for the non BSG caseAndrew 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 OrphanBernhard Walle (1):
ips: Update version informationBoaz Harrosh (2):
ide-scsi.: convert to data accessors and !use_sg cleanup
microtek: use data accessors and !use_sg cleanupChristof Schmitt (5):
zfcp: Enable debug feature before setting adapter online
scsi_transport_fc: Introduce disa...
On Tue, 25 Sep 2007 20:00:02 -0500
Can we make new 'supporrted_mode' and 'active_mode' attributes look
better?
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
-
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 defaultThis 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-
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
-
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, Isupported_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.
-
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."
-
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
-
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);
-
On Tue, 25 Sep 2007 22:45:53 -0500
should be:
-
Yes, sorry ... code in haste etc.
James
-
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, TargetThe values are not enumerated. They are like FC_PORT_ROLE.
-
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
-
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.
-
ACK
-
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."
-
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.
-
| Andy Whitcroft | clam |
| Jon Smirl | Re: 463 kernel developers missing! |
| Trent Piepho | [PATCH] [POWERPC] Improve (in|out)_beXX() asm code |
| Linus Torvalds | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
git: | |
| Jarek Poplawski | Re: HTB accuracy for high speed |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Natalie Protasevich | [BUG] New Kernel Bugs |
