From: Linus Torvalds Date: Sat, 26 Jan 2008 01:19:08 +0000 (-0800) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=9b73e76f3cf63379dcf45fcd4f112f5812418d0a;p=openwrt%2Fstaging%2Fblogic.git Merge git://git./linux/kernel/git/jejb/scsi-misc-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (200 commits) [SCSI] usbstorage: use last_sector_bug flag universally [SCSI] libsas: abstract STP task status into a function [SCSI] ultrastor: clean up inline asm warnings [SCSI] aic7xxx: fix firmware build [SCSI] aacraid: fib context lock for management ioctls [SCSI] ch: remove forward declarations [SCSI] ch: fix device minor number management bug [SCSI] ch: handle class_device_create failure properly [SCSI] NCR5380: fix section mismatch [SCSI] sg: fix /proc/scsi/sg/devices when no SCSI devices [SCSI] IB/iSER: add logical unit reset support [SCSI] don't use __GFP_DMA for sense buffers if not required [SCSI] use dynamically allocated sense buffer [SCSI] scsi.h: add macro for enclosure bit of inquiry data [SCSI] sd: add fix for devices with last sector access problems [SCSI] fix pcmcia compile problem [SCSI] aacraid: add Voodoo Lite class of cards. [SCSI] aacraid: add new driver features flags [SCSI] qla2xxx: Update version number to 8.02.00-k7. [SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command. ... --- 9b73e76f3cf63379dcf45fcd4f112f5812418d0a diff --cc drivers/ata/libata-scsi.c index 3fd08201bef4,bc5cf6b8a4b8..c02c490122dc --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@@ -839,11 -839,15 +839,18 @@@ static void ata_scsi_dev_config(struct if (dev->class == ATA_DEV_ATAPI) { struct request_queue *q = sdev->request_queue; blk_queue_max_hw_segments(q, q->max_hw_segments - 1); - } + + /* set the min alignment */ + blk_queue_update_dma_alignment(sdev->request_queue, + ATA_DMA_PAD_SZ - 1); + } else + /* ATA devices must be sector aligned */ + blk_queue_update_dma_alignment(sdev->request_queue, + ATA_SECT_SIZE - 1); + if (dev->class == ATA_DEV_ATA) + sdev->manage_start_stop = 1; + if (dev->flags & ATA_DFLAG_AN) set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events); diff --cc drivers/scsi/hosts.c index 6325115e5b3d,9a10b4335e76..5ea1f986220c --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@@ -429,18 -428,8 +428,17 @@@ void scsi_unregister(struct Scsi_Host * } EXPORT_SYMBOL(scsi_unregister); +static int __scsi_host_match(struct class_device *cdev, void *data) +{ + struct Scsi_Host *p; + unsigned short *hostnum = (unsigned short *)data; + + p = class_to_shost(cdev); + return p->host_no == *hostnum; +} + /** * scsi_host_lookup - get a reference to a Scsi_Host by host no - * * @hostnum: host number to locate * * Return value: