diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-06 20:48:34 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-06 20:48:34 -0400 |
| commit | bced13738405b62c8203df9c103d4ba63d747872 (patch) | |
| tree | 566795dc7493591182668a94855487dff034a2b3 | |
| parent | 21f16289270447673a7263ccc0b22d562fb01ecb (diff) | |
| parent | 2b053729a84b6aac197df51b8729bc9fec743bff (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (32 commits)
[SCSI] aacraid: prevent panic on adapter resource failure
[SCSI] aha152x: use data accessors and !use_sg cleanup
[SCSI] aha152x: Fix check_condition code-path
[SCSI] aha152x: Clean Reset path
[SCSI] aha152x: preliminary fixes and some comments
[SCSI] aha152x: use bounce buffer
[SCSI] aha152x: fix debug mode symbol conflict
[SCSI] sd: disentangle barriers in SCSI
[SCSI] lpfc : scsi command accessor fix for 8.2.2
[SCSI] qlogicpti: Some cosmetic changes
[SCSI] lpfc 8.2.2 : Change version number to 8.2.2
[SCSI] lpfc 8.2.2 : Style cleanups
[SCSI] lpfc 8.2.2 : Miscellaneous Bug Fixes
[SCSI] lpfc 8.2.2 : Miscellaneous management and logging mods
[SCSI] lpfc 8.2.2 : Rework the lpfc_printf_log() macro
[SCSI] lpfc 8.2.2 : Attribute and Parameter splits for vport and physical port
[SCSI] lpfc 8.2.2 : Fix locking around HBA's port_list
[SCSI] lpfc 8.2.2 : Error messages and debugfs updates
[SCSI] initialize shost_data to zero
[SCSI] mptsas: add SMP passthrough support via bsg
...
46 files changed, 2837 insertions, 2050 deletions
diff --git a/block/bsg.c b/block/bsg.c index d60eee549405..ed2646827234 100644 --- a/block/bsg.c +++ b/block/bsg.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * bsg.c - block layer implementation of the sg v3 interface | 2 | * bsg.c - block layer implementation of the sg v4 interface |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2004 Jens Axboe <axboe@suse.de> SUSE Labs | 4 | * Copyright (C) 2004 Jens Axboe <axboe@suse.de> SUSE Labs |
| 5 | * Copyright (C) 2004 Peter M. Jones <pjones@redhat.com> | 5 | * Copyright (C) 2004 Peter M. Jones <pjones@redhat.com> |
| @@ -421,7 +421,6 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr, | |||
| 421 | hdr->info = 0; | 421 | hdr->info = 0; |
| 422 | if (hdr->device_status || hdr->transport_status || hdr->driver_status) | 422 | if (hdr->device_status || hdr->transport_status || hdr->driver_status) |
| 423 | hdr->info |= SG_INFO_CHECK; | 423 | hdr->info |= SG_INFO_CHECK; |
| 424 | hdr->din_resid = rq->data_len; | ||
| 425 | hdr->response_len = 0; | 424 | hdr->response_len = 0; |
| 426 | 425 | ||
| 427 | if (rq->sense_len && hdr->response) { | 426 | if (rq->sense_len && hdr->response) { |
| @@ -437,9 +436,14 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr, | |||
| 437 | } | 436 | } |
| 438 | 437 | ||
| 439 | if (rq->next_rq) { | 438 | if (rq->next_rq) { |
| 439 | hdr->dout_resid = rq->data_len; | ||
| 440 | hdr->din_resid = rq->next_rq->data_len; | ||
| 440 | blk_rq_unmap_user(bidi_bio); | 441 | blk_rq_unmap_user(bidi_bio); |
| 441 | blk_put_request(rq->next_rq); | 442 | blk_put_request(rq->next_rq); |
| 442 | } | 443 | } else if (rq_data_dir(rq) == READ) |
| 444 | hdr->din_resid = rq->data_len; | ||
| 445 | else | ||
| 446 | hdr->dout_resid = rq->data_len; | ||
| 443 | 447 | ||
| 444 | blk_rq_unmap_user(bio); | 448 | blk_rq_unmap_user(bio); |
| 445 | blk_put_request(rq); | 449 | blk_put_request(rq); |
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index e866dacde7e5..414c109f4cf5 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
| @@ -88,7 +88,9 @@ module_param(mpt_channel_mapping, int, 0); | |||
| 88 | MODULE_PARM_DESC(mpt_channel_mapping, " Mapping id's to channels (default=0)"); | 88 | MODULE_PARM_DESC(mpt_channel_mapping, " Mapping id's to channels (default=0)"); |
| 89 | 89 | ||
| 90 | static int mpt_debug_level; | 90 | static int mpt_debug_level; |
| 91 | module_param(mpt_debug_level, int, 0); | 91 | static int mpt_set_debug_level(const char *val, struct kernel_param *kp); |
| 92 | module_param_call(mpt_debug_level, mpt_set_debug_level, param_get_int, | ||
| 93 | &mpt_debug_level, 0600); | ||
| 92 | MODULE_PARM_DESC(mpt_debug_level, " debug level - refer to mptdebug.h - (default=0)"); | 94 | MODULE_PARM_DESC(mpt_debug_level, " debug level - refer to mptdebug.h - (default=0)"); |
| 93 | 95 | ||
| 94 | #ifdef MFCNT | 96 | #ifdef MFCNT |
| @@ -220,6 +222,19 @@ pci_enable_io_access(struct pci_dev *pdev) | |||
| 220 | pci_write_config_word(pdev, PCI_COMMAND, command_reg); | 222 | pci_write_config_word(pdev, PCI_COMMAND, command_reg); |
| 221 | } | 223 | } |
| 222 | 224 | ||
| 225 | static int mpt_set_debug_level(const char *val, struct kernel_param *kp) | ||
| 226 | { | ||
| 227 | int ret = param_set_int(val, kp); | ||
| 228 | MPT_ADAPTER *ioc; | ||
| 229 | |||
| 230 | if (ret) | ||
| 231 | return ret; | ||
| 232 | |||
| 233 | list_for_each_entry(ioc, &ioc_list, list) | ||
| 234 | ioc->debug_level = mpt_debug_level; | ||
| 235 | return 0; | ||
| 236 | } | ||
| 237 | |||
| 223 | /* | 238 | /* |
| 224 | * Process turbo (context) reply... | 239 | * Process turbo (context) reply... |
| 225 | */ | 240 | */ |
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 29add83da588..b9c69bff218c 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
| @@ -1312,11 +1312,137 @@ mptsas_get_bay_identifier(struct sas_rphy *rphy) | |||
| 1312 | return rc; | 1312 | return rc; |
| 1313 | } | 1313 | } |
| 1314 | 1314 | ||
| 1315 | static int mptsas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, | ||
| 1316 | struct request *req) | ||
| 1317 | { | ||
| 1318 | MPT_ADAPTER *ioc = ((MPT_SCSI_HOST *) shost->hostdata)->ioc; | ||
| 1319 | MPT_FRAME_HDR *mf; | ||
| 1320 | SmpPassthroughRequest_t *smpreq; | ||
| 1321 | struct request *rsp = req->next_rq; | ||
| 1322 | int ret; | ||
| 1323 | int flagsLength; | ||
| 1324 | unsigned long timeleft; | ||
| 1325 | char *psge; | ||
| 1326 | dma_addr_t dma_addr_in = 0; | ||
| 1327 | dma_addr_t dma_addr_out = 0; | ||
| 1328 | u64 sas_address = 0; | ||
| 1329 | |||
| 1330 | if (!rsp) { | ||
| 1331 | printk(KERN_ERR "%s: the smp response space is missing\n", | ||
| 1332 | __FUNCTION__); | ||
| 1333 | return -EINVAL; | ||
| 1334 | } | ||
| 1335 | |||
| 1336 | /* do we need to support multiple segments? */ | ||
| 1337 | if (req->bio->bi_vcnt > 1 || rsp->bio->bi_vcnt > 1) { | ||
| 1338 | printk(KERN_ERR "%s: multiple segments req %u %u, rsp %u %u\n", | ||
| 1339 | __FUNCTION__, req->bio->bi_vcnt, req->data_len, | ||
| 1340 | rsp->bio->bi_vcnt, rsp->data_len); | ||
| 1341 | return -EINVAL; | ||
| 1342 | } | ||
| 1343 | |||
| 1344 | ret = mutex_lock_interruptible(&ioc->sas_mgmt.mutex); | ||
| 1345 | if (ret) | ||
| 1346 | goto out; | ||
| 1347 | |||
| 1348 | mf = mpt_get_msg_frame(mptsasMgmtCtx, ioc); | ||
| 1349 | if (!mf) { | ||
| 1350 | |||
