public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* queued patches for SCSI for 2.6.24
@ 2007-09-26  1:00 James Bottomley
  2007-09-26  1:05 ` David Miller
  2007-09-26  1:28 ` FUJITA Tomonori
  0 siblings, 2 replies; 17+ messages in thread
From: James Bottomley @ 2007-09-26  1:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-scsi, linux-kernel

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 disable_target_scan flag
      zfcp: Remove braces for only one statement
      zfcp: Remove unnecessary assignment
      zfcp: correct indentation for nested if-else

David Miller (1):
      esp: fix instance numbering.

David Woodhouse (1):
      Fix ibmvscsi client for multiplatform iSeries+pSeries kernel

Eric Moore (10):
      MAINTAINERS : mpt fusion mailing list change
      mpt fusion: bump version to 3.04.06
      mpt fusion: Kconfig cleanup
      mpt fusion: removing Dell copyright
      mpt fusion: removing references to hd->ioc
      mpt fusion: rename vdev to vdevice
      mpt fusion: adding/removing white space
      mpt fusion: standardize printks and debug info
      mpt fusion: Add support for ATTO 4LD: Rebranded LSI 53C1030
      Addition to pci_ids.h for ATTO Technology, Inc.

FUJITA Tomonori (17):
      srp_transport: convert to use supported_mode attribute
      fc_transport: add target driver support
      add supported_mode and active_mode attributes to the host
      tgt: fix can_queue bug
      fc4: convert to use the data buffer accessors
      sg: increase sglist_len of the sg_scatter_hold structure
      ps3rom: convert to use the data buffer accessors
      scsi_transport_srp: remove tgt dependencies
      tgt: convert ibmvstgt to use transport tsk_mgmt_response callback
      tgt: move tsk_mgmt_response callback to transport class
      tgt: convert libsrp and ibmvstgt to use srp_transport
      srp_transport: add target driver support
      tgt: add I_T nexus support
      transport_srp: add rport roles attribute
      ib_srp: convert to use the srp transport class
      ibmvscsi: convert to use the srp transport class
      add srp transport class

Gabriel C (1):
      NCR5380: fix NCR53C400_PSEUDO_DMA is not defined

Gilbert Wu (1):
      aic94xx: Add new PCI ID for ASC58300

Heiko Carstens (3):
      zfcp: avoid if (whatever) ; constructs.
      zfcp: allocate gid_pn_data objects from gid_pn_cache.
      zfcp: fix memory leak.

HighPoint Linux Team (1):
      hptiop: adding new firmware interface and more PCI device IDs

James Bottomley (3):
      sg: use idr to replace static arrays
      move ULD attachment into the prep function
      arcmsr: fix compile problems

Jan Engelhardt (1):
      mpt fusion: Use menuconfig objects

Jeff Garzik (2):
      arcmsr: irq handler fixes, cleanups, micro-opts
      arcmsr: Fix hardware wait loops

Jesper Juhl (3):
      mpt fusion: fix two potential mem leaks
      NCR_D700, lpfc: Clean up duplicate includes
      lpfc: fix potential overflow of hbqs array

Joe Carnuccio (1):
      qla2xxx: Allow region-based flash-part accesses.

Kay Sievers (1):
      switch sdev sysfs attributes to default attributes

Mariusz Kozlowski (3):
      mpt fusion: remove redundant memset
      mpt fusion: mostly kmalloc + memset conversion to kzalloc
      kmalloc + memset conversion to kzalloc

Masatake YAMATO (1):
      Fix signness of parameters in scsi module

Matthew Wilcox (49):
      ips: Close narrow race in release
      aic94xx: Free scsi host on error
      simscsi: Free scsi host on error
      qlogicfas: Close narrow race in release
      aha152x: Close narrow race in release
      ncr53c8xx: Call scsi_host_put in release
      ide-scsi: Close narrow race in release
      ibmmca: Stop leaking scsi_hosts on exit
      scsi_scan: Cope with kthread_run failing
      Improve error message when offlining a device
      advansys: Use DRV_NAME
      advansys: Comment/indentation/macro cleanup
      advansys: Remove some custom wrappers
      advansys: Remove a check for an impossible condition
      advansys: Support 16-byte commands properly
      advansys: Enable interrupts earlier in queuecommand
      advansys: Remove `active' queue and all remaining internal queueing code
      advansys: Remove `done' queue
      advansys: Remove a check for an impossible condition
      advansys: Remove `waiting' queue
      advansys: Shrink advansys_board_found a little more
      advansys: Reformat microcode
      advansys: Create AdvLoadMicrocode
      advansys: Create AdvBuildCarrierFreelist
      advansys: Fix VLB driver name
      advansys: Move documentation to Documentation/scsi
      advansys: use memcpy instead of open-coded loop
      advansys: Remove pci_slot_info
      advansys: Remove library-style callback routines
      advansys: Move struct device out of the cfg structures
      advansys: Stop using n_io_port in Scsi_Host structure
      advansys: ioremap no longer needs page-aligned addresses
      advansys: delete AscGetChipBusType
      advansys: misc reformatting
      advansys: remove INQUIRY sniffing
      Add QUANTUM XP34301 to the blacklist
      advansys: remove AscCompareString()
      advansys: More PCI cleanups
      advansys: Update resource management
      advansys: Convert to ISA driver model
      advansys: Convert to EISA driver model
      advansys: Convert to PCI driver model
      advansys: Move to scsi hotplug initialisation model
      advansys: Make advansys_board_found a little more readable
      advansys: Stop checking the scsi_cmnd belongs to our Scsi_Host
      advansys: Improve interrupt handler
      advansys: Clean up proc_info implementation
      advansys: undate version, copyright, etc
      Fix async scanning double-add problems

Matthias Kaehlcke (1):
      osst: Use mutex instead of semaphore

Michael Reed (1):
      stale residual returned on write following BUSY retry

Mike Christie (1):
      fix write buffer length in scsi_req_map_sg()

Nick Cheng (1):
      arcmsr: 1.20.00.15: add SATA RAID plus other fixes

Prakash, Sathya (5):
      mpt fusion: Change company name from LSI Logic to LSI
      mpt fusion: Link speed change display support
      mpt fusion: Creation of mptsas.h header file
      mpt fusion: Change call back indices to u8 from int
      mpt fusion: Usage of high priority request FIFO to send task management commands

Ravi Anand (1):
      qla2xxx: Correct infinite-login-retry issue.

Salyzyn, Mark (1):
      aacraid: Add documentation for new Adaptec, SMC and SUN cards

Seokmann Ju (2):
      qla2xxx: Retrieve max-NPIV support capabilities from FW.
      qla2xxx: Add PCI error recovery support.

Swen Schillig (2):
      zfcp: whitespace cleanup
      zfcp: cleanup, separation of ERP, non ERP-version for exchange_ functions



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: queued patches for SCSI for 2.6.24
  2007-09-26  1:00 queued patches for SCSI for 2.6.24 James Bottomley
@ 2007-09-26  1:05 ` David Miller
  2007-09-26  1:28 ` FUJITA Tomonori
  1 sibling, 0 replies; 17+ messages in thread
From: David Miller @ 2007-09-26  1:05 UTC (permalink / raw)
  To: James.Bottomley; +Cc: akpm, linux-scsi, linux-kernel

From: James Bottomley <James.Bottomley@SteelEye.com>
Date: Tue, 25 Sep 2007 20:00:02 -0500

> David Miller (1):
>       esp: fix instance numbering.

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.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: queued patches for SCSI for 2.6.24
  2007-09-26  1:00 queued patches for SCSI for 2.6.24 James Bottomley
  2007-09-26  1:05 ` David Miller
@ 2007-09-26  1:28 ` FUJITA Tomonori
  2007-09-26  1:42   ` James Bottomley
  1 sibling, 1 reply; 17+ messages in thread
From: FUJITA Tomonori @ 2007-09-26  1:28 UTC (permalink / raw)
  To: James.Bottomley; +Cc: akpm, linux-scsi, linux-kernel, fujita.tomonori

On Tue, 25 Sep 2007 20:00:02 -0500
James Bottomley <James.Bottomley@SteelEye.com> wrote:

> 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.

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

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: queued patches for SCSI for 2.6.24
  2007-09-26  1:28 ` FUJITA Tomonori
@ 2007-09-26  1:42   ` James Bottomley
  2007-09-26  2:12     ` FUJITA Tomonori
  0 siblings, 1 reply; 17+ messages in thread
From: James Bottomley @ 2007-09-26  1:42 UTC (permalink / raw)
  To: FUJITA Tomonori; +Cc: akpm, linux-scsi, linux-kernel, fujita.tomonori

On Wed, 2007-09-26 at 10:28 +0900, FUJITA Tomonori wrote:
> On Tue, 25 Sep 2007 20:00:02 -0500
> James Bottomley <James.Bottomley@SteelEye.com> wrote:
> 
> > 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.
> 
> Can we make new 'supporrted_mode' and 'active_mode' attributes look
> better?
> 
> http://marc.info/?l=linux-scsi&m=118991196128245&w=2

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



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: queued patches for SCSI for 2.6.24
  2007-09-26  1:42   ` James Bottomley
@ 2007-09-26  2:12     ` FUJITA Tomonori
  2007-09-26  2:37       ` Jeff Garzik
  0 siblings, 1 reply; 17+ messages in thread
From: FUJITA Tomonori @ 2007-09-26  2:12 UTC (permalink / raw)
  To: James.Bottomley; +Cc: tomof, akpm, linux-scsi, linux-kernel, fujita.tomonori

On Tue, 25 Sep 2007 20:42:35 -0500
James Bottomley <James.Bottomley@SteelEye.com> wrote:

> On Wed, 2007-09-26 at 10:28 +0900, FUJITA Tomonori wrote:
> > On Tue, 25 Sep 2007 20:00:02 -0500
> > James Bottomley <James.Bottomley@SteelEye.com> wrote:
> > 
> > > 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.
> > 
> > Can we make new 'supporrted_mode' and 'active_mode' attributes look
> > better?
> > 
> > http://marc.info/?l=linux-scsi&m=118991196128245&w=2
> 
> 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?

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


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: queued patches for SCSI for 2.6.24
  2007-09-26  2:12     ` FUJITA Tomonori
@ 2007-09-26  2:37       ` Jeff Garzik
  2007-09-26  2:52         ` FUJITA Tomonori
  2007-09-26  2:56         ` Matthew Wilcox
  0 siblings, 2 replies; 17+ messages in thread
From: Jeff Garzik @ 2007-09-26  2:37 UTC (permalink / raw)
  To: FUJITA Tomonori, James.Bottomley
  Cc: akpm, linux-scsi, linux-kernel, fujita.tomonori

FUJITA Tomonori wrote:
> 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;


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



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: queued patches for SCSI for 2.6.24
  2007-09-26  2:37       ` Jeff Garzik
@ 2007-09-26  2:52         ` FUJITA Tomonori
  2007-09-26  2:56         ` Matthew Wilcox
  1 sibling, 0 replies; 17+ messages in thread
From: FUJITA Tomonori @ 2007-09-26  2:52 UTC (permalink / raw)
  To: jeff
  Cc: tomof, James.Bottomley, akpm, linux-scsi, linux-kernel,
	fujita.tomonori

On Tue, 25 Sep 2007 22:37:33 -0400
Jeff Garzik <jeff@garzik.org> wrote:

> FUJITA Tomonori wrote:
> > 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;
> 
> 
> 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.

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


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

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.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: queued patches for SCSI for 2.6.24
  2007-09-26  2:37       ` Jeff Garzik
  2007-09-26  2:52         ` FUJITA Tomonori
@ 2007-09-26  2:56         ` Matthew Wilcox
  2007-09-26  3:34           ` Jeff Garzik
  1 sibling, 1 reply; 17+ messages in thread
From: Matthew Wilcox @ 2007-09-26  2:56 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: FUJITA Tomonori, James.Bottomley, akpm, linux-scsi, linux-kernel,
	fujita.tomonori

On Tue, Sep 25, 2007 at 10:37:33PM -0400, Jeff Garzik wrote:
> 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.

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."

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: queued patches for SCSI for 2.6.24
  2007-09-26  2:56         ` Matthew Wilcox
@ 2007-09-26  3:34           ` Jeff Garzik
  2007-09-26  3:38             ` Matthew Wilcox
  2007-09-26  3:45             ` James Bottomley
  0 siblings, 2 replies; 17+ messages in thread
From: Jeff Garzik @ 2007-09-26  3:34 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: FUJITA Tomonori, James.Bottomley, akpm, linux-scsi, linux-kernel,
	fujita.tomonori

Matthew Wilcox wrote:
> On Tue, Sep 25, 2007 at 10:37:33PM -0400, Jeff Garzik wrote:
>> 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.
> 
> 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.

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




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: queued patches for SCSI for 2.6.24
  2007-09-26  3:34           ` Jeff Garzik
@ 2007-09-26  3:38             ` Matthew Wilcox
  2007-09-26  3:45             ` James Bottomley
  1 sibling, 0 replies; 17+ messages in thread
From: Matthew Wilcox @ 2007-09-26  3:38 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: FUJITA Tomonori, James.Bottomley, akpm, linux-scsi, linux-kernel,
	fujita.tomonori

On Tue, Sep 25, 2007 at 11:34:00PM -0400, Jeff Garzik wrote:
> 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.

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."

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: queued patches for SCSI for 2.6.24
  2007-09-26  3:34           ` Jeff Garzik
  2007-09-26  3:38             ` Matthew Wilcox
@ 2007-09-26  3:45             ` James Bottomley
  2007-09-26  3:55               ` Jeff Garzik
                                 ` (2 more replies)
  1 sibling, 3 replies; 17+ messages in thread
From: James Bottomley @ 2007-09-26  3:45 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: Matthew Wilcox, FUJITA Tomonori, akpm, linux-scsi, linux-kernel,
	fujita.tomonori

On Tue, 2007-09-25 at 23:34 -0400, Jeff Garzik wrote:
> Matthew Wilcox wrote:
> > On Tue, Sep 25, 2007 at 10:37:33PM -0400, Jeff Garzik wrote:
> >> 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.
> > 
> > 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.
> 
> 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.

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);



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: queued patches for SCSI for 2.6.24
  2007-09-26  3:45             ` James Bottomley
@ 2007-09-26  3:55               ` Jeff Garzik
  2007-09-26  3:55               ` FUJITA Tomonori
  2007-09-26  4:56               ` FUJITA Tomonori
  2 siblings, 0 replies; 17+ messages in thread
From: Jeff Garzik @ 2007-09-26  3:55 UTC (permalink / raw)
  To: James Bottomley
  Cc: Matthew Wilcox, FUJITA Tomonori, akpm, linux-scsi, linux-kernel,
	fujita.tomonori

James Bottomley wrote:
> 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);


ACK


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: queued patches for SCSI for 2.6.24
  2007-09-26  3:45             ` James Bottomley
  2007-09-26  3:55               ` Jeff Garzik
@ 2007-09-26  3:55               ` FUJITA Tomonori
  2007-09-26  4:01                 ` James Bottomley
  2007-09-26  4:56               ` FUJITA Tomonori
  2 siblings, 1 reply; 17+ messages in thread
From: FUJITA Tomonori @ 2007-09-26  3:55 UTC (permalink / raw)
  To: James.Bottomley
  Cc: jeff, matthew, tomof, akpm, linux-scsi, linux-kernel,
	fujita.tomonori

On Tue, 25 Sep 2007 22:45:53 -0500
James Bottomley <James.Bottomley@SteelEye.com> wrote:

> On Tue, 2007-09-25 at 23:34 -0400, Jeff Garzik wrote:
> > Matthew Wilcox wrote:
> > > On Tue, Sep 25, 2007 at 10:37:33PM -0400, Jeff Garzik wrote:
> > >> 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.
> > > 
> > > 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.
> > 
> > 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.
> 
> 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?

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.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: queued patches for SCSI for 2.6.24
  2007-09-26  3:55               ` FUJITA Tomonori
@ 2007-09-26  4:01                 ` James Bottomley
  2007-09-26  4:10                   ` FUJITA Tomonori
  0 siblings, 1 reply; 17+ messages in thread
From: James Bottomley @ 2007-09-26  4:01 UTC (permalink / raw)
  To: FUJITA Tomonori
  Cc: jeff, matthew, akpm, linux-scsi, linux-kernel, fujita.tomonori

On Wed, 2007-09-26 at 12:55 +0900, FUJITA Tomonori wrote:
> On Tue, 25 Sep 2007 22:45:53 -0500
> James Bottomley <James.Bottomley@SteelEye.com> wrote:
> 
> > On Tue, 2007-09-25 at 23:34 -0400, Jeff Garzik wrote:
> > > Matthew Wilcox wrote:
> > > > On Tue, Sep 25, 2007 at 10:37:33PM -0400, Jeff Garzik wrote:
> > > >> 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.
> > > > 
> > > > 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.
> > > 
> > > 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.
> > 
> > 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?
> 
> 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.

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



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: queued patches for SCSI for 2.6.24
  2007-09-26  4:01                 ` James Bottomley
@ 2007-09-26  4:10                   ` FUJITA Tomonori
  0 siblings, 0 replies; 17+ messages in thread
From: FUJITA Tomonori @ 2007-09-26  4:10 UTC (permalink / raw)
  To: James.Bottomley
  Cc: tomof, jeff, matthew, akpm, linux-scsi, linux-kernel,
	fujita.tomonori

On Tue, 25 Sep 2007 23:01:53 -0500
James Bottomley <James.Bottomley@SteelEye.com> wrote:

> On Wed, 2007-09-26 at 12:55 +0900, FUJITA Tomonori wrote:
> > On Tue, 25 Sep 2007 22:45:53 -0500
> > James Bottomley <James.Bottomley@SteelEye.com> wrote:
> > 
> > > On Tue, 2007-09-25 at 23:34 -0400, Jeff Garzik wrote:
> > > > Matthew Wilcox wrote:
> > > > > On Tue, Sep 25, 2007 at 10:37:33PM -0400, Jeff Garzik wrote:
> > > > >> 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.
> > > > > 
> > > > > 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.
> > > > 
> > > > 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.
> > > 
> > > 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?
> > 
> > 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.
> 
> 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.

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.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: queued patches for SCSI for 2.6.24
  2007-09-26  3:45             ` James Bottomley
  2007-09-26  3:55               ` Jeff Garzik
  2007-09-26  3:55               ` FUJITA Tomonori
@ 2007-09-26  4:56               ` FUJITA Tomonori
  2007-09-26 14:07                 ` James Bottomley
  2 siblings, 1 reply; 17+ messages in thread
From: FUJITA Tomonori @ 2007-09-26  4:56 UTC (permalink / raw)
  To: James.Bottomley
  Cc: jeff, matthew, tomof, akpm, linux-scsi, linux-kernel,
	fujita.tomonori

On Tue, 25 Sep 2007 22:45:53 -0500
James Bottomley <James.Bottomley@SteelEye.com> wrote:

> On Tue, 2007-09-25 at 23:34 -0400, Jeff Garzik wrote:
> > Matthew Wilcox wrote:
> > > On Tue, Sep 25, 2007 at 10:37:33PM -0400, Jeff Garzik wrote:
> > >> 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.
> > > 
> > > 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.
> > 
> > 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.
> 
> 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);

should be:

return show_shost_mode(supported_mode, buf);

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: queued patches for SCSI for 2.6.24
  2007-09-26  4:56               ` FUJITA Tomonori
@ 2007-09-26 14:07                 ` James Bottomley
  0 siblings, 0 replies; 17+ messages in thread
From: James Bottomley @ 2007-09-26 14:07 UTC (permalink / raw)
  To: FUJITA Tomonori
  Cc: jeff, matthew, akpm, linux-scsi, linux-kernel, fujita.tomonori

On Wed, 2007-09-26 at 13:56 +0900, FUJITA Tomonori wrote:
> On Tue, 25 Sep 2007 22:45:53 -0500
> James Bottomley <James.Bottomley@SteelEye.com> wrote:
> 
> > On Tue, 2007-09-25 at 23:34 -0400, Jeff Garzik wrote:
> > > Matthew Wilcox wrote:
> > > > On Tue, Sep 25, 2007 at 10:37:33PM -0400, Jeff Garzik wrote:
> > > >> 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.
> > > > 
> > > > 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.
> > > 
> > > 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.
> > 
> > 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);
> 
> should be:
> 
> return show_shost_mode(supported_mode, buf);

Yes, sorry ... code in haste etc.

James



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2007-09-26 14:07 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-26  1:00 queued patches for SCSI for 2.6.24 James Bottomley
2007-09-26  1:05 ` David Miller
2007-09-26  1:28 ` FUJITA Tomonori
2007-09-26  1:42   ` James Bottomley
2007-09-26  2:12     ` FUJITA Tomonori
2007-09-26  2:37       ` Jeff Garzik
2007-09-26  2:52         ` FUJITA Tomonori
2007-09-26  2:56         ` Matthew Wilcox
2007-09-26  3:34           ` Jeff Garzik
2007-09-26  3:38             ` Matthew Wilcox
2007-09-26  3:45             ` James Bottomley
2007-09-26  3:55               ` Jeff Garzik
2007-09-26  3:55               ` FUJITA Tomonori
2007-09-26  4:01                 ` James Bottomley
2007-09-26  4:10                   ` FUJITA Tomonori
2007-09-26  4:56               ` FUJITA Tomonori
2007-09-26 14:07                 ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox