From 7f23e146a122966bd58e5da9c16a0e12385f09fc Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Thu, 1 Dec 2005 12:50:13 -0600 Subject: [SCSI] correct some dropped const compiler warnings Make the vendor, model and rev fields in scsi_device pointers to const and update a few prototypes of functions using them. Signed-off-by: James Bottomley --- include/scsi/scsi_device.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/scsi') diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 85cfd88461c..063e32fe036 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -79,9 +79,9 @@ struct scsi_device { char inq_periph_qual; /* PQ from INQUIRY data */ unsigned char inquiry_len; /* valid bytes in 'inquiry' */ unsigned char * inquiry; /* INQUIRY response data */ - char * vendor; /* [back_compat] point into 'inquiry' ... */ - char * model; /* ... after scan; point to static string */ - char * rev; /* ... "nullnullnullnull" before scan */ + const char * vendor; /* [back_compat] point into 'inquiry' ... */ + const char * model; /* ... after scan; point to static string */ + const char * rev; /* ... "nullnullnullnull" before scan */ unsigned char current_tag; /* current tag */ struct scsi_target *sdev_target; /* used only for single_lun */ -- cgit v1.2.3 From 829b84675edbe05f11c289946216da4f5c6b8e94 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Tue, 13 Dec 2005 10:29:31 -0700 Subject: [SCSI] Make scsi_transport_spi.h includable by itself Add forward declarations to allow scsi_transport_spi.h to be compiled by itself. Signed-off-by: Matthew Wilcox Signed-off-by: James Bottomley --- include/scsi/scsi_transport_spi.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/scsi') diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h index 6bdc4afb248..5c9b2e56e5b 100644 --- a/include/scsi/scsi_transport_spi.h +++ b/include/scsi/scsi_transport_spi.h @@ -24,6 +24,9 @@ #include struct scsi_transport_template; +struct scsi_target; +struct scsi_device; +struct Scsi_Host; struct spi_transport_attrs { int period; /* value in the PPR/SDTR command */ -- cgit v1.2.3 From 6e68af666f5336254b5715dca591026b7324499a Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Fri, 11 Nov 2005 05:30:27 -0600 Subject: [SCSI] Convert SCSI mid-layer to scsi_execute_async Add scsi helpers to create really-large-requests and convert scsi-ml to scsi_execute_async(). Per Jens's previous comments, I placed this function in scsi_lib.c. I made it follow all the queue's limits - I think I did at least :), so I removed the warning on the function header. I think the scsi_execute_* functions should eventually take a request_queue and be placed some place where the dm-multipath hw_handler can use them if that failover code is going to stay in the kernel. That conversion patch will be sent in another mail though. Signed-off-by: Mike Christie Signed-off-by: James Bottomley --- include/scsi/scsi_device.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/scsi') diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 063e32fe036..e94ca4d3603 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -274,6 +274,12 @@ extern int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, extern int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd, int data_direction, void *buffer, unsigned bufflen, struct scsi_sense_hdr *, int timeout, int retries); +extern int scsi_execute_async(struct scsi_device *sdev, + const unsigned char *cmd, int data_direction, + void *buffer, unsigned bufflen, int use_sg, + int timeout, int retries, void *privdata, + void (*done)(void *, char *, int, int), + gfp_t gfp); static inline unsigned int sdev_channel(struct scsi_device *sdev) { -- cgit v1.2.3 From 7b16318dea8d9840dac567a2ae8c50ecdea36aea Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Thu, 15 Dec 2005 20:17:02 -0600 Subject: Fix up SCSI mismerge I forgot to do a git-update-cache on the merged files ... --- include/scsi/scsi_cmnd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/scsi') diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 20da282d4ab..41cfc29be89 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -151,6 +151,6 @@ extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); extern void scsi_put_command(struct scsi_cmnd *); extern void scsi_io_completion(struct scsi_cmnd *, unsigned int, unsigned int); extern void scsi_finish_command(struct scsi_cmnd *cmd); -extern void scsi_setup_blk_pc_cmnd(struct scsi_cmnd *cmd, int retries); +extern void scsi_setup_blk_pc_cmnd(struct scsi_cmnd *cmd); #endif /* _SCSI_SCSI_CMND_H */ -- cgit v1.2.3 From 1abfd370134553f3b47e3e40a0526e05001409c2 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Thu, 15 Dec 2005 16:22:01 -0500 Subject: [SCSI] Rename scsi_print_msg to spi_print_msg Rename scsi_print_msg to spi_print_msg and move its prototype from scsi_dbg.h to scsi_transport_spi.h Signed-off-by: Matthew Wilcox Signed-off-by: James Bottomley --- include/scsi/scsi_dbg.h | 1 - include/scsi/scsi_transport_spi.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'include/scsi') diff --git a/include/scsi/scsi_dbg.h b/include/scsi/scsi_dbg.h index b090a11d7e1..4d69dee66d4 100644 --- a/include/scsi/scsi_dbg.h +++ b/include/scsi/scsi_dbg.h @@ -16,7 +16,6 @@ extern void __scsi_print_sense(const char *name, extern void scsi_print_driverbyte(int); extern void scsi_print_hostbyte(int); extern void scsi_print_status(unsigned char); -extern int scsi_print_msg(const unsigned char *); extern const char *scsi_sense_key_string(unsigned char); extern const char *scsi_extd_sense_format(unsigned char, unsigned char); diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h index 5c9b2e56e5b..54a89611e9c 100644 --- a/include/scsi/scsi_transport_spi.h +++ b/include/scsi/scsi_transport_spi.h @@ -146,5 +146,6 @@ void spi_release_transport(struct scsi_transport_template *); 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 *); #endif /* SCSI_TRANSPORT_SPI_H */ -- cgit v1.2.3