Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Automatic merge of rsync://www.parisc-linux.org/~jejb/git/scsi-for-linus-2.6.git

+48 -39
+1 -1
drivers/s390/scsi/zfcp_aux.c
··· 52 52 static inline int zfcp_sg_list_copy_to_user(void __user *, 53 53 struct zfcp_sg_list *, size_t); 54 54 55 - static int zfcp_cfdc_dev_ioctl(struct file *, unsigned int, unsigned long); 55 + static long zfcp_cfdc_dev_ioctl(struct file *, unsigned int, unsigned long); 56 56 57 57 #define ZFCP_CFDC_IOC_MAGIC 0xDD 58 58 #define ZFCP_CFDC_IOC \
-1
drivers/s390/scsi/zfcp_def.h
··· 61 61 #include <linux/mempool.h> 62 62 #include <linux/syscalls.h> 63 63 #include <linux/ioctl.h> 64 - #include <linux/ioctl32.h> 65 64 66 65 /************************ DEBUG FLAGS *****************************************/ 67 66
+1 -1
drivers/scsi/aacraid/linit.c
··· 450 450 } 451 451 } 452 452 453 - return 0; 453 + return err; 454 454 } 455 455 456 456 /**
-2
drivers/scsi/aic7xxx/aic7xxx_osm.c
··· 2335 2335 AHC_TRANS_GOAL, /*paused*/FALSE); 2336 2336 ahc_update_neg_request(ahc, &devinfo, tstate, tinfo, AHC_NEG_ALWAYS); 2337 2337 ahc->platform_data->targets[target_offset] = NULL; 2338 - if (targ->inq_data != NULL) 2339 - free(targ->inq_data, M_DEVBUF); 2340 2338 free(targ, M_DEVBUF); 2341 2339 } 2342 2340
-6
drivers/scsi/aic7xxx/aic7xxx_osm.h
··· 423 423 struct ahc_linux_target *target; 424 424 }; 425 425 426 - typedef enum { 427 - AHC_INQ_VALID = 0x02, 428 - } ahc_linux_targ_flags; 429 - 430 426 struct ahc_linux_target { 431 427 struct ahc_linux_device *devices[AHC_NUM_LUNS]; 432 428 int channel; ··· 430 434 int refcount; 431 435 struct ahc_transinfo last_tinfo; 432 436 struct ahc_softc *ahc; 433 - ahc_linux_targ_flags flags; 434 - struct scsi_inquiry_data *inq_data; 435 437 }; 436 438 437 439 /********************* Definitions Required by the Core ***********************/
+1 -7
drivers/scsi/qla2xxx/qla_attr.c
··· 300 300 rport->dev_loss_tmo = ha->port_down_retry_count + 5; 301 301 } 302 302 303 - static struct fc_function_template qla2xxx_transport_functions = { 303 + struct fc_function_template qla2xxx_transport_functions = { 304 304 305 305 .show_host_node_name = 1, 306 306 .show_host_port_name = 1, ··· 321 321 .show_rport_dev_loss_tmo = 1, 322 322 323 323 }; 324 - 325 - struct scsi_transport_template * 326 - qla2x00_alloc_transport_tmpl(void) 327 - { 328 - return (fc_attach_transport(&qla2xxx_transport_functions)); 329 - } 330 324 331 325 void 332 326 qla2x00_init_host_attr(scsi_qla_host_t *ha)
+2 -2
drivers/scsi/qla2xxx/qla_gbl.h
··· 24 24 #define __QLA_GBL_H 25 25 26 26 #include <linux/interrupt.h> 27 - #include <scsi/scsi_transport.h> 28 27 29 28 extern void qla2x00_remove_one(struct pci_dev *); 30 29 extern int qla2x00_probe_one(struct pci_dev *, struct qla_board_info *); ··· 247 248 /* 248 249 * Global Function Prototypes in qla_attr.c source file. 249 250 */ 251 + struct fc_function_template; 252 + extern struct fc_function_template qla2xxx_transport_functions; 250 253 extern void qla2x00_alloc_sysfs_attr(scsi_qla_host_t *); 251 254 extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *); 252 - extern struct scsi_transport_template *qla2x00_alloc_transport_tmpl(void); 253 255 extern void qla2x00_init_host_attr(scsi_qla_host_t *); 254 256 extern void qla2x00_alloc_sysfs_attr(scsi_qla_host_t *); 255 257 extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *);
+2 -1
drivers/scsi/qla2xxx/qla_os.c
··· 2350 2350 #if DEBUG_QLA2100 2351 2351 strcat(qla2x00_version_str, "-debug"); 2352 2352 #endif 2353 - qla2xxx_transport_template = qla2x00_alloc_transport_tmpl(); 2353 + qla2xxx_transport_template = 2354 + fc_attach_transport(&qla2xxx_transport_functions); 2354 2355 if (!qla2xxx_transport_template) 2355 2356 return -ENODEV; 2356 2357
+1 -1
drivers/scsi/scsi.c
··· 542 542 * that the device is no longer present */ 543 543 cmd->result = DID_NO_CONNECT << 16; 544 544 atomic_inc(&cmd->device->iorequest_cnt); 545 - scsi_done(cmd); 545 + __scsi_done(cmd); 546 546 /* return 0 (because the command has been processed) */ 547 547 goto out; 548 548 }
+34 -15
drivers/scsi/scsi_transport_spi.c
··· 22 22 #include <linux/init.h> 23 23 #include <linux/module.h> 24 24 #include <linux/workqueue.h> 25 + #include <linux/blkdev.h> 25 26 #include <asm/semaphore.h> 26 27 #include <scsi/scsi.h> 27 28 #include "scsi_priv.h" ··· 41 40 #define SPI_HOST_ATTRS 1 42 41 43 42 #define SPI_MAX_ECHO_BUFFER_SIZE 4096 43 + 44 + #define DV_LOOPS 3 45 + #define DV_TIMEOUT (10*HZ) 46 + #define DV_RETRIES 3 /* should only need at most 47 + * two cc/ua clears */ 44 48 45 49 /* Private data accessors (keep these out of the header file) */ 46 50 #define spi_dv_pending(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_pending) ··· 104 98 105 99 dest[result++] = '\0'; 106 100 return result; 101 + } 102 + 103 + /* Modification of scsi_wait_req that will clear UNIT ATTENTION conditions 104 + * resulting from (likely) bus and device resets */ 105 + static void spi_wait_req(struct scsi_request *sreq, const void *cmd, 106 + void *buffer, unsigned bufflen) 107 + { 108 + int i; 109 + 110 + for(i = 0; i < DV_RETRIES; i++) { 111 + sreq->sr_request->flags |= REQ_FAILFAST; 112 + 113 + scsi_wait_req(sreq, cmd, buffer, bufflen, 114 + DV_TIMEOUT, /* retries */ 1); 115 + if (sreq->sr_result & DRIVER_SENSE) { 116 + struct scsi_sense_hdr sshdr; 117 + 118 + if (scsi_request_normalize_sense(sreq, &sshdr) 119 + && sshdr.sense_key == UNIT_ATTENTION) 120 + continue; 121 + } 122 + break; 123 + } 107 124 } 108 125 109 126 static struct { ··· 407 378 if(i->f->set_##x) \ 408 379 i->f->set_##x(sdev->sdev_target, y) 409 380 410 - #define DV_LOOPS 3 411 - #define DV_TIMEOUT (10*HZ) 412 - #define DV_RETRIES 3 /* should only need at most 413 - * two cc/ua clears */ 414 - 415 381 enum spi_compare_returns { 416 382 SPI_COMPARE_SUCCESS, 417 383 SPI_COMPARE_FAILURE, ··· 470 446 for (r = 0; r < retries; r++) { 471 447 sreq->sr_cmd_len = 0; /* wait_req to fill in */ 472 448 sreq->sr_data_direction = DMA_TO_DEVICE; 473 - scsi_wait_req(sreq, spi_write_buffer, buffer, len, 474 - DV_TIMEOUT, DV_RETRIES); 449 + spi_wait_req(sreq, spi_write_buffer, buffer, len); 475 450 if(sreq->sr_result || !scsi_device_online(sdev)) { 476 451 struct scsi_sense_hdr sshdr; 477 452 ··· 494 471 memset(ptr, 0, len); 495 472 sreq->sr_cmd_len = 0; /* wait_req to fill in */ 496 473 sreq->sr_data_direction = DMA_FROM_DEVICE; 497 - scsi_wait_req(sreq, spi_read_buffer, ptr, len, 498 - DV_TIMEOUT, DV_RETRIES); 474 + spi_wait_req(sreq, spi_read_buffer, ptr, len); 499 475 scsi_device_set_state(sdev, SDEV_QUIESCE); 500 476 501 477 if (memcmp(buffer, ptr, len) != 0) ··· 522 500 523 501 memset(ptr, 0, len); 524 502 525 - scsi_wait_req(sreq, spi_inquiry, ptr, len, 526 - DV_TIMEOUT, DV_RETRIES); 503 + spi_wait_req(sreq, spi_inquiry, ptr, len); 527 504 528 505 if(sreq->sr_result || !scsi_device_online(sdev)) { 529 506 scsi_device_set_state(sdev, SDEV_QUIESCE); ··· 614 593 * (reservation conflict, device not ready, etc) just 615 594 * skip the write tests */ 616 595 for (l = 0; ; l++) { 617 - scsi_wait_req(sreq, spi_test_unit_ready, NULL, 0, 618 - DV_TIMEOUT, DV_RETRIES); 596 + spi_wait_req(sreq, spi_test_unit_ready, NULL, 0); 619 597 620 598 if(sreq->sr_result) { 621 599 if(l >= 3) ··· 628 608 sreq->sr_cmd_len = 0; 629 609 sreq->sr_data_direction = DMA_FROM_DEVICE; 630 610 631 - scsi_wait_req(sreq, spi_read_buffer_descriptor, buffer, 4, 632 - DV_TIMEOUT, DV_RETRIES); 611 + spi_wait_req(sreq, spi_read_buffer_descriptor, buffer, 4); 633 612 634 613 if (sreq->sr_result) 635 614 /* Device has no echo buffer */
+3
drivers/scsi/sr_ioctl.c
··· 281 281 char *buffer = kmalloc(32, GFP_KERNEL | SR_GFP_DMA(cd)); 282 282 int result; 283 283 284 + if (!buffer) 285 + return -ENOMEM; 286 + 284 287 memset(&cgc, 0, sizeof(struct packet_command)); 285 288 cgc.cmd[0] = GPCMD_READ_SUBCHANNEL; 286 289 cgc.cmd[2] = 0x40; /* I do want the subchannel info */
+3 -2
drivers/scsi/sym53c8xx_2/sym_glue.c
··· 2038 2038 struct sym_hcb *np = sym_get_hcb(shost); 2039 2039 struct sym_tcb *tp = &np->target[starget->id]; 2040 2040 2041 - /* have to have DT for these transfers */ 2042 - if (period <= np->minsync) 2041 + /* have to have DT for these transfers, but DT will also 2042 + * set width, so check that this is allowed */ 2043 + if (period <= np->minsync && spi_width(starget)) 2043 2044 tp->tgoal.dt = 1; 2044 2045 2045 2046 tp->tgoal.period = period;