From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Stanley Date: Wed, 19 Jan 2011 20:20:38 +0000 Subject: Re: Early-boot kernel panics from udev-165/extras/ata_id/ata_id.c Message-Id: <4D374796.1010009@verizon.net> List-Id: References: <4D263BF6.6050305@verizon.net> In-Reply-To: <4D263BF6.6050305@verizon.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Ok, looks like this fixes it. So would this patch go in 2.6.37.1 ? John On 01/18/2011 10:09 AM, Tejun Heo wrote: > Hello, > > Can you please test whether the following patch fixes the problem? > > Thanks. > > diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c > index 5defc74..9d46731 100644 > --- a/drivers/ata/libata-scsi.c > +++ b/drivers/ata/libata-scsi.c > @@ -1099,9 +1099,9 @@ static int ata_scsi_dev_config(struct scsi_device *sdev, > struct request_queue *q = sdev->request_queue; > void *buf; > > - /* set the min alignment and padding */ > - blk_queue_update_dma_alignment(sdev->request_queue, > - ATA_DMA_PAD_SZ - 1); > + sdev->sector_size = ATA_SECT_SIZE; > + > + /* set DMA padding */ > blk_queue_update_dma_pad(sdev->request_queue, > ATA_DMA_PAD_SZ - 1); > > @@ -1115,13 +1115,18 @@ static int ata_scsi_dev_config(struct scsi_device *sdev, > > blk_queue_dma_drain(q, atapi_drain_needed, buf, ATAPI_MAX_DRAIN); > } else { > - /* ATA devices must be sector aligned */ > sdev->sector_size = ata_id_logical_sector_size(dev->id); > - blk_queue_update_dma_alignment(sdev->request_queue, > - sdev->sector_size - 1); > sdev->manage_start_stop = 1; > } > > + /* > + * ata_pio_sectors() expect sector alignment on buffers. ATAPI > + * devices also need the alignment as IDENTIFY_PACKET is executed > + * as ATA_PROT_PIO. > + */ > + blk_queue_update_dma_alignment(sdev->request_queue, > + sdev->sector_size - 1); > + > if (dev->flags& ATA_DFLAG_AN) > set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events); > >