From c67a848c3587296fe9794c95d1be7109c4c85461 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Tue, 17 Jan 2006 11:54:24 -0700 Subject: [SCSI] Neaten comments in scsi_cmnd.h Wrap these two comments at 80 columns Signed-off-by: Matthew Wilcox Signed-off-by: James Bottomley --- include/scsi/scsi_cmnd.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 7529f4388bb..1ace1b9fe53 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -104,10 +104,10 @@ struct scsi_cmnd { working on */ #define SCSI_SENSE_BUFFERSIZE 96 - unsigned char sense_buffer[SCSI_SENSE_BUFFERSIZE]; /* obtained by REQUEST SENSE - * when CHECK CONDITION is - * received on original command - * (auto-sense) */ + unsigned char sense_buffer[SCSI_SENSE_BUFFERSIZE]; + /* obtained by REQUEST SENSE when + * CHECK CONDITION is received on original + * command (auto-sense) */ /* Low-level done function - can be used by low-level driver to point * to completion function. Not used by mid/upper level code. */ @@ -120,12 +120,12 @@ struct scsi_cmnd { struct scsi_pointer SCp; /* Scratchpad used by some host adapters */ unsigned char *host_scribble; /* The host adapter is allowed to - * call scsi_malloc and get some memory - * and hang it here. The host adapter - * is also expected to call scsi_free - * to release this memory. (The memory - * obtained by scsi_malloc is guaranteed - * to be at an address < 16Mb). */ + * call scsi_malloc and get some memory + * and hang it here. The host adapter + * is also expected to call scsi_free + * to release this memory. (The memory + * obtained by scsi_malloc is guaranteed + * to be at an address < 16Mb). */ int result; /* Status code from lower level driver */ -- cgit v1.2.3 From 5e3c34c1e988a0dfe177c38cf324e8e321c55ef5 Mon Sep 17 00:00:00 2001 From: Greg KH Date: Wed, 18 Jan 2006 16:17:46 -0800 Subject: [SCSI] Remove devfs support from the SCSI subsystem As devfs has been disabled from the kernel tree for a number of months now (5 to be exact), here's a patch against 2.6.16-rc1-git1 that removes support for it from the SCSI subsystem. The patch also removes the scsi_disk devfs_name field as it's no longer needed. Signed-off-by: Greg Kroah-Hartman Signed-off-by: James Bottomley --- include/scsi/scsi_device.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 290e3b4d2ae..cde84b39bb6 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -73,7 +73,6 @@ struct scsi_device { unsigned sector_size; /* size in bytes */ void *hostdata; /* available to low-level driver */ - char devfs_name[256]; /* devfs junk */ char type; char scsi_level; char inq_periph_qual; /* PQ from INQUIRY data */ -- cgit v1.2.3 From 6ea3c0b2dac0d6a857d6bc010e544f4c901fff78 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Tue, 7 Feb 2006 07:54:46 -0700 Subject: [SCSI] Add spi_populate_*_msg functions Introduce new helpers: - spi_populate_width_msg() - spi_populate_sync_msg() - spi_populate_ppr_msg() and use them in drivers which already enable the SPI transport. Signed-off-by: Matthew Wilcox Signed-off-by: James Bottomley --- include/scsi/scsi_transport_spi.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h index fb5a2ffae93..5e1d61913d4 100644 --- a/include/scsi/scsi_transport_spi.h +++ b/include/scsi/scsi_transport_spi.h @@ -148,5 +148,9 @@ void spi_schedule_dv_device(struct scsi_device *); void spi_dv_device(struct scsi_device *); void spi_display_xfer_agreement(struct scsi_target *); int spi_print_msg(const unsigned char *); +int spi_populate_width_msg(unsigned char *msg, int width); +int spi_populate_sync_msg(unsigned char *msg, int period, int offset); +int spi_populate_ppr_msg(unsigned char *msg, int period, int offset, int width, + int options); #endif /* SCSI_TRANSPORT_SPI_H */ -- cgit v1.2.3 From a012564136a665f8d63443c057ba368572b483df Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 16 Feb 2006 13:31:47 +0100 Subject: [SCSI] sas: add support for enclosure and bad ID rphy attributes Signed-off-by: Christoph Hellwig Signed-off-by: James Bottomley --- include/scsi/scsi_transport_sas.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index b91400bfb02..ccef5d2cf47 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h @@ -94,6 +94,8 @@ struct sas_rphy { /* The functions by which the transport class and the driver communicate */ struct sas_function_template { int (*get_linkerrors)(struct sas_phy *); + int (*get_enclosure_identifier)(struct sas_rphy *, u64 *); + int (*get_bay_identifier)(struct sas_rphy *); int (*phy_reset)(struct sas_phy *, int); }; -- cgit v1.2.3 From 1bfc5d9d5eb8e1a2efacc306bc55c248ed259a8e Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Thu, 9 Feb 2006 15:26:18 -0500 Subject: [SCSI] Recognize missing LUNs for non-standard devices Some non-standard SCSI targets or protocols, such as USB UFI, report "no LUN present" by setting the Peripheral Device Type to 0x1f and the Peripheral Qualifier to 0 (not 3 as the standard requires) in the INQUIRY response. This patch (as650b) adds a new target flag and code to accomodate such targets. Signed-off-by: Alan Stern Signed-off-by: James Bottomley --- include/scsi/scsi_device.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index cde84b39bb6..8d77da932d2 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -167,7 +167,10 @@ struct scsi_target { unsigned int channel; unsigned int id; /* target id ... replace * scsi_device.id eventually */ - unsigned long create:1; /* signal that it needs to be added */ + unsigned int create:1; /* signal that it needs to be added */ + unsigned int pdt_1f_for_no_lun; /* PDT = 0x1f */ + /* means no lun present */ + char scsi_level; void *hostdata; /* available to low-level driver */ unsigned long starget_data[0]; /* for the transport */ -- cgit v1.2.3 From 1fa44ecad2b86475e038aed81b0bf333fa484f8b Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Thu, 23 Feb 2006 12:43:43 -0600 Subject: [SCSI] add execute_in_process_context() API We have several points in the SCSI stack (primarily for our device functions) where we need to guarantee process context, but (given the place where the last reference was released) we cannot guarantee this. This API gets around the issue by executing the function directly if the caller has process context, but scheduling a workqueue to execute in process context if the caller doesn't have it. Signed-off-by: James Bottomley --- include/linux/workqueue.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 86b11130023..957c21c16d6 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -20,6 +20,10 @@ struct work_struct { struct timer_list timer; }; +struct execute_work { + struct work_struct work; +}; + #define __WORK_INITIALIZER(n, f, d) { \ .entry = { &(n).entry, &(n).entry }, \ .func = (f), \ @@ -74,6 +78,8 @@ extern void init_workqueues(void); void cancel_rearming_delayed_work(struct work_struct *work); void cancel_rearming_delayed_workqueue(struct workqueue_struct *, struct work_struct *); +int execute_in_process_context(void (*fn)(void *), void *, + struct execute_work *); /* * Kill off a pending schedule_delayed_work(). Note that the work callback -- cgit v1.2.3 From ffedb4522571ac170f941678d138a31bc0884ab4 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Thu, 23 Feb 2006 14:27:18 -0600 Subject: [SCSI] fix scsi process problems and clean up the target reap issues In order to use the new execute_in_process_context() API, you have to provide it with the work storage, which I do in SCSI in scsi_device and scsi_target, but which also means that we can no longer queue up the target reaps, so instead I moved the target to a state model which allows target_alloc to detect if we've received a dying target and wait for it to be gone. Hopefully, this should also solve the target namespace race. Signed-off-by: James Bottomley --- include/scsi/scsi.h | 2 -- include/scsi/scsi_device.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 9c331258bc2..c60b8ff2f5e 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -433,6 +433,4 @@ struct scsi_lun { /* Used to obtain the PCI location of a device */ #define SCSI_IOCTL_GET_PCI 0x5387 -int scsi_execute_in_process_context(void (*fn)(void *data), void *data); - #endif /* _SCSI_SCSI_H */ diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 8d77da932d2..1ec17ee1281 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -4,6 +4,7 @@ #include #include #include +#include #include struct request_queue; @@ -137,6 +138,8 @@ struct scsi_device { struct device sdev_gendev; struct class_device sdev_classdev; + struct execute_work ew; /* used to get process context on put */ + enum scsi_device_state sdev_state; unsigned long sdev_data[0]; } __attribute__((aligned(sizeof(unsigned long)))); @@ -153,6 +156,11 @@ struct scsi_device { #define scmd_printk(prefix, scmd, fmt, a...) \ dev_printk(prefix, &(scmd)->device->sdev_gendev, fmt, ##a) +enum scsi_target_state { + STARGET_RUNNING = 1, + STARGET_DEL, +}; + /* * scsi_target: representation of a scsi target, for now, this is only * used for single_lun devices. If no one has active IO to the target, @@ -172,6 +180,8 @@ struct scsi_target { /* means no lun present */ char scsi_level; + struct execute_work ew; + enum scsi_target_state state; void *hostdata; /* available to low-level driver */ unsigned long starget_data[0]; /* for the transport */ /* starget_data must be the last element!!!! */ -- cgit v1.2.3 From 7e6dff62dad539cbd608bb3b8b833193d13f00ac Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Thu, 2 Mar 2006 14:12:56 -0600 Subject: [SCSI] add 6.0 Gbit phy definitions to the sas transport class I don't think these exist in silicon yet, but the aic94xx driver has a register setting for them. Signed-off-by: James Bottomley --- include/scsi/scsi_transport_sas.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index ccef5d2cf47..95e2132d485 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h @@ -30,6 +30,7 @@ enum sas_linkrate { SAS_SATA_PORT_SELECTOR, SAS_LINK_RATE_1_5_GBPS, SAS_LINK_RATE_3_0_GBPS, + SAS_LINK_RATE_6_0_GBPS, SAS_LINK_VIRTUAL, }; -- cgit v1.2.3 From 42ab03609cca4ef5079e248296f015650c626899 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sat, 4 Mar 2006 09:10:18 -0600 Subject: [PATCH] convert aic94xx over to using the sas transport end device Begin introducing the concept of sas remote devices that have an rphy embedded. The first one (this) is a simple end device. All that an end device really does is have port mode page parameters contained. The next and more complex piece will be expander remote devices. Signed-off-by: James Bottomley --- include/scsi/scsi_transport_sas.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include') diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 95e2132d485..8fded431cf4 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h @@ -82,6 +82,10 @@ struct sas_rphy { struct sas_identify identify; struct list_head list; u32 scsi_target_id; + /* temporary expedient: mark the rphy as being contained + * within a type specific rphy + * FIXME: pull this out when everything uses the containers */ + unsigned contained:1; }; #define dev_to_rphy(d) \ @@ -90,6 +94,19 @@ struct sas_rphy { dev_to_rphy((cdev)->dev) #define rphy_to_shost(rphy) \ dev_to_shost((rphy)->dev.parent) +#define target_to_rphy(targ) \ + dev_to_rphy((targ)->dev.parent) + +struct sas_end_device { + struct sas_rphy rphy; + /* flags */ + unsigned ready_led_meaning:1; + /* parameters */ + u16 I_T_nexus_loss_timeout; + u16 initiator_response_timeout; +}; +#define rphy_to_end_device(r) \ + container_of((r), struct sas_end_device, rphy) /* The functions by which the transport class and the driver communicate */ @@ -110,6 +127,7 @@ extern void sas_phy_delete(struct sas_phy *); extern int scsi_is_sas_phy(const struct device *); extern struct sas_rphy *sas_rphy_alloc(struct sas_phy *); +extern struct sas_rphy *sas_end_device_alloc(struct sas_phy *); void sas_rphy_free(struct sas_rphy *); extern int sas_rphy_add(struct sas_rphy *); extern void sas_rphy_delete(struct sas_rphy *); @@ -118,5 +136,6 @@ extern int scsi_is_sas_rphy(const struct device *); extern struct scsi_transport_template * sas_attach_transport(struct sas_function_template *); extern void sas_release_transport(struct scsi_transport_template *); +int sas_read_port_mode_page(struct scsi_device *); #endif /* SCSI_TRANSPORT_SAS_H */ -- cgit v1.2.3 From 044cc6c8ec311c4ddeebfcc31c53dea282de70b7 Mon Sep 17 00:00:00 2001 From: "andrew.vasquez@qlogic.com" Date: Thu, 9 Mar 2006 14:27:13 -0800 Subject: [SCSI] qla2xxx: Add ISP54xx support. Chip is similar in form to our ISP24xx offering. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley --- include/linux/pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 82b83da25d7..1afac931351 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -852,6 +852,8 @@ #define PCI_DEVICE_ID_QLOGIC_ISP2432 0x2432 #define PCI_DEVICE_ID_QLOGIC_ISP2512 0x2512 #define PCI_DEVICE_ID_QLOGIC_ISP2522 0x2522 +#define PCI_DEVICE_ID_QLOGIC_ISP5422 0x5422 +#define PCI_DEVICE_ID_QLOGIC_ISP5432 0x5432 #define PCI_VENDOR_ID_CYRIX 0x1078 #define PCI_DEVICE_ID_CYRIX_5510 0x0000 -- cgit v1.2.3 From c829c394165f981d49f05a9be228404d7a9398d4 Mon Sep 17 00:00:00 2001 From: James Smart Date: Mon, 13 Mar 2006 08:28:57 -0500 Subject: [SCSI] FC transport : Avoid device offline cases by stalling aborts until device unblocked This moves the eh_timed_out functionality from the scsi_host_template to the transport_template. Given that this is now a transport function, the EH_RESET_TIMER case no longer caps the timer reschedulings. The transport guarantees that this is not an infinite condition. Signed-off-by: James Bottomley --- include/scsi/scsi_host.h | 14 -------------- include/scsi/scsi_transport.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 827992949c4..a6cf3e535c0 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -146,20 +146,6 @@ struct scsi_host_template { int (* eh_bus_reset_handler)(struct scsi_cmnd *); int (* eh_host_reset_handler)(struct scsi_cmnd *); - /* - * This is an optional routine to notify the host that the scsi - * timer just fired. The returns tell the timer routine what to - * do about this: - * - * EH_HANDLED: I fixed the error, please complete the command - * EH_RESET_TIMER: I need more time, reset the timer and - * begin counting again - * EH_NOT_HANDLED Begin normal error recovery - * - * Status: OPTIONAL - */ - enum scsi_eh_timer_return (* eh_timed_out)(struct scsi_cmnd *); - /* * Before the mid layer attempts to scan for a new device where none * currently exists, it will call this entry in your driver. Should diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h index e7b1054adf8..b3657f11193 100644 --- a/include/scsi/scsi_transport.h +++ b/include/scsi/scsi_transport.h @@ -48,6 +48,17 @@ struct scsi_transport_template { * True if the transport wants to use a host-based work-queue */ unsigned int create_work_queue : 1; + + /* + * This is an optional routine that allows the transport to become + * involved when a scsi io timer fires. The return value tells the + * timer routine how to finish the io timeout handling: + * EH_HANDLED: I fixed the error, please complete the command + * EH_RESET_TIMER: I need more time, reset the timer and + * begin counting again + * EH_NOT_HANDLED Begin normal error recovery + */ + enum scsi_eh_timer_return (* eh_timed_out)(struct scsi_cmnd *); }; #define transport_class_to_shost(tc) \ -- cgit v1.2.3 From 79cb1819e231f811211133a09a5382cb89d7ec67 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Mon, 13 Mar 2006 13:50:04 -0600 Subject: [SCSI] add preliminary expander support to the sas transport class This patch makes expanders appear as labelled objects with properties in the SAS tree. I've also modified the phy code to make expander phys appear labelled by host number, expander number and phy index. So, for my current config, you see something like this in sysfs: /sys/class/scsi_host/host1/device/phy-1:4/expander-1:0/phy-1-0:12/rphy-1:0-12/target1:0:1 And the expander properties are: jejb@sparkweed> cd /sys/class/sas_expander/expander-1\:0/ jejb@sparkweed> for f in *; do echo -n $f ": "; cat $f; done component_id : 29024 component_revision_id : 4 component_vendor_id : VITESSE device : cat: device: Is a directory level : 0 product_id : VSC7160 Eval Brd product_rev : 4 uevent : cat: uevent: Permission denied vendor_id : VITESSE Signed-off-by: James Bottomley --- include/scsi/scsi_transport_sas.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'include') diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 8fded431cf4..2943ccc22a4 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h @@ -108,6 +108,25 @@ struct sas_end_device { #define rphy_to_end_device(r) \ container_of((r), struct sas_end_device, rphy) +struct sas_expander_device { + int level; + + #define SAS_EXPANDER_VENDOR_ID_LEN 8 + char vendor_id[SAS_EXPANDER_VENDOR_ID_LEN+1]; + #define SAS_EXPANDER_PRODUCT_ID_LEN 16 + char product_id[SAS_EXPANDER_PRODUCT_ID_LEN+1]; + #define SAS_EXPANDER_PRODUCT_REV_LEN 4 + char product_rev[SAS_EXPANDER_PRODUCT_REV_LEN+1]; + #define SAS_EXPANDER_COMPONENT_VENDOR_ID_LEN 8 + char component_vendor_id[SAS_EXPANDER_COMPONENT_VENDOR_ID_LEN+1]; + u16 component_id; + u8 component_revision_id; + + struct sas_rphy rphy; + +}; +#define rphy_to_expander_device(r) \ + container_of((r), struct sas_expander_device, rphy) /* The functions by which the transport class and the driver communicate */ struct sas_function_template { @@ -128,6 +147,7 @@ extern int scsi_is_sas_phy(const struct device *); extern struct sas_rphy *sas_rphy_alloc(struct sas_phy *); extern struct sas_rphy *sas_end_device_alloc(struct sas_phy *); +extern struct sas_rphy *sas_expander_alloc(struct sas_phy *, enum sas_device_type); void sas_rphy_free(struct sas_rphy *); extern int sas_rphy_add(struct sas_rphy *); extern void sas_rphy_delete(struct sas_rphy *); @@ -138,4 +158,15 @@ sas_attach_transport(struct sas_function_template *); extern void sas_release_transport(struct scsi_transport_template *); int sas_read_port_mode_page(struct scsi_device *); +static inline int +scsi_is_sas_expander_device(struct device *dev) +{ + struct sas_rphy *rphy; + if (!scsi_is_sas_rphy(dev)) + return 0; + rphy = dev_to_rphy(dev); + return rphy->identify.device_type == SAS_FANOUT_EXPANDER_DEVICE || + rphy->identify.device_type == SAS_EDGE_EXPANDER_DEVICE; +} + #endif /* SCSI_TRANSPORT_SAS_H */ -- cgit v1.2.3 From e935d5da8e5d12fabe5b632736c50eae0427e8c8 Mon Sep 17 00:00:00 2001 From: "Moore, Eric" Date: Tue, 14 Mar 2006 09:18:18 -0700 Subject: [SCSI] drivers/base/bus.c - export reprobe Adding support for exposing hidden raid components for sg interface. The sdev->no_uld_attach flag will set set accordingly. The sas module supports adding/removing raid volumes using online storage management application interface. This patch was provided to me by Christoph Hellwig. Signed-off-by: Eric Moore Signed-off-by: Greg Kroah-Hartman Signed-off-by: James Bottomley --- include/linux/device.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/device.h b/include/linux/device.h index 58df18d9cd3..e8ac5bcfbec 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -378,6 +378,7 @@ extern void device_bind_driver(struct device * dev); extern void device_release_driver(struct device * dev); extern int device_attach(struct device * dev); extern void driver_attach(struct device_driver * drv); +extern void device_reprobe(struct device *dev); /* -- cgit v1.2.3 From e28482c5b24006e9e4a867f9995baf358cbc1059 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Tue, 14 Mar 2006 14:24:55 -0600 Subject: [SCSI] add scsi_reprobe_device Original from Christoph Hellwig and Eric Moore. This version exports the scsi_reprobe_device() function as an inline. Signed-off-by: James Bottomley --- include/scsi/scsi_device.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 1ec17ee1281..f2193cd0d31 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -293,6 +293,11 @@ extern int scsi_execute_async(struct scsi_device *sdev, void (*done)(void *, char *, int, int), gfp_t gfp); +static inline void scsi_device_reprobe(struct scsi_device *sdev) +{ + device_reprobe(&sdev->sdev_gendev); +} + static inline unsigned int sdev_channel(struct scsi_device *sdev) { return sdev->channel; -- cgit v1.2.3 From 5baba830e93732e802dc7e0a362eb730e1917f58 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sat, 18 Mar 2006 14:10:35 -0600 Subject: [SCSI] add scsi_mode_select to scsi_lib.c This complements the scsi_mode_sense() function Signed-off-by: James Bottomley --- include/scsi/scsi_device.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index f2193cd0d31..895d212864c 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -261,6 +261,11 @@ extern int scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage, unsigned char *buffer, int len, int timeout, int retries, struct scsi_mode_data *data, struct scsi_sense_hdr *); +extern int scsi_mode_select(struct scsi_device *sdev, int pf, int sp, + int modepage, unsigned char *buffer, int len, + int timeout, int retries, + struct scsi_mode_data *data, + struct scsi_sense_hdr *); extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, int retries); extern int scsi_device_set_state(struct scsi_device *sdev, -- cgit v1.2.3 From 2f8600dff2b140096a7df781884e918a16aa90e0 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sat, 18 Mar 2006 15:00:50 -0600 Subject: [SCSI] eliminate rphy allocation in favour of expander/end device allocation This allows the removal of the contained flag and also does a bit of class renaming (sas_rphy->sas_device). Signed-off-by: James Bottomley --- include/scsi/scsi_transport_sas.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include') diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 2943ccc22a4..93cfb4bf421 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h @@ -82,10 +82,6 @@ struct sas_rphy { struct sas_identify identify; struct list_head list; u32 scsi_target_id; - /* temporary expedient: mark the rphy as being contained - * within a type specific rphy - * FIXME: pull this out when everything uses the containers */ - unsigned contained:1; }; #define dev_to_rphy(d) \ @@ -145,7 +141,6 @@ extern int sas_phy_add(struct sas_phy *); extern void sas_phy_delete(struct sas_phy *); extern int scsi_is_sas_phy(const struct device *); -extern struct sas_rphy *sas_rphy_alloc(struct sas_phy *); extern struct sas_rphy *sas_end_device_alloc(struct sas_phy *); extern struct sas_rphy *sas_expander_alloc(struct sas_phy *, enum sas_device_type); void sas_rphy_free(struct sas_rphy *); -- cgit v1.2.3 From 30afc84cf7325e88fb9746340eba3c161080ff49 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Sat, 18 Mar 2006 18:40:14 +0900 Subject: [SCSI] libata: implement minimal transport template for ->eh_timed_out SCSI midlayer has moved hostt->eh_timed_out to transport template. As libata doesn't need full-blown transport support yet, implement minimal transport for libata. No transport class or whatsoever, just empty transport template with ->eh_timed_out hook. Signed-off-by: Tejun Heo Signed-off-by: James Bottomley --- include/linux/libata.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/linux/libata.h b/include/linux/libata.h index 239408ecfdd..204c37a55f0 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -508,7 +508,6 @@ extern void ata_host_set_remove(struct ata_host_set *host_set); extern int ata_scsi_detect(struct scsi_host_template *sht); extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); -extern enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd); extern int ata_scsi_error(struct Scsi_Host *host); extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); -- cgit v1.2.3