login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
September
»
25
Re: queued patches for SCSI for 2.6.24
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Jeff Garzik <jeff@...>
To: James Bottomley <James.Bottomley@...>
Cc: Matthew Wilcox <matthew@...>, FUJITA Tomonori <tomof@...>, <akpm@...>, <linux-scsi@...>, <linux-kernel@...>, <fujita.tomonori@...>
Subject:
Re: queued patches for SCSI for 2.6.24
Date: Tuesday, September 25, 2007 - 11:55 pm
James Bottomley wrote:
quoted text
> 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 -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
queued patches for SCSI for 2.6.24
, James Bottomley
, (Tue Sep 25, 9:00 pm)
Re: queued patches for SCSI for 2.6.24
, FUJITA Tomonori
, (Tue Sep 25, 9:28 pm)
Re: queued patches for SCSI for 2.6.24
, James Bottomley
, (Tue Sep 25, 9:42 pm)
Re: queued patches for SCSI for 2.6.24
, FUJITA Tomonori
, (Tue Sep 25, 10:12 pm)
Re: queued patches for SCSI for 2.6.24
, Jeff Garzik
, (Tue Sep 25, 10:37 pm)
Re: queued patches for SCSI for 2.6.24
, FUJITA Tomonori
, (Tue Sep 25, 10:52 pm)
Re: queued patches for SCSI for 2.6.24
, Matthew Wilcox
, (Tue Sep 25, 10:56 pm)
Re: queued patches for SCSI for 2.6.24
, Jeff Garzik
, (Tue Sep 25, 11:34 pm)
Re: queued patches for SCSI for 2.6.24
, James Bottomley
, (Tue Sep 25, 11:45 pm)
Re: queued patches for SCSI for 2.6.24
, FUJITA Tomonori
, (Wed Sep 26, 12:56 am)
Re: queued patches for SCSI for 2.6.24
, James Bottomley
, (Wed Sep 26, 10:07 am)
Re: queued patches for SCSI for 2.6.24
, FUJITA Tomonori
, (Tue Sep 25, 11:55 pm)
Re: queued patches for SCSI for 2.6.24
, James Bottomley
, (Wed Sep 26, 12:01 am)
Re: queued patches for SCSI for 2.6.24
, FUJITA Tomonori
, (Wed Sep 26, 12:10 am)
Re: queued patches for SCSI for 2.6.24
, Jeff Garzik
, (Tue Sep 25, 11:55 pm)
Re: queued patches for SCSI for 2.6.24
, Matthew Wilcox
, (Tue Sep 25, 11:38 pm)
Re: queued patches for SCSI for 2.6.24
, David Miller
, (Tue Sep 25, 9:05 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Tejun Heo
[PATCH 2/5] sysfs: simplify sysfs_rename_dir()
Andi Kleen
[PATCH x86] [0/16] Various i386/x86-64 changes
Dave Hansen
Re: [RFC/PATCH] Documentation of kernel messages
git
:
openbsd-misc
:
linux-netdev
:
Gerrit Renker
[PATCH 15/37] dccp: Set per-connection CCIDs via socket options
David Miller
[GIT]: Networking
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Thomas Gleixner
Re: [BUG] New Kernel Bugs
Colocation donated by:
Who's online
There are currently
1 user
and
528 guests
online.
Online users
shavond8
Syndicate