From: John Stanley <jpsinthemix@verizon.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: Early-boot kernel panics from udev-165/extras/ata_id/ata_id.c
Date: Tue, 18 Jan 2011 21:48:49 +0000 [thread overview]
Message-ID: <4D360AC1.5040407@verizon.net> (raw)
In-Reply-To: <4D263BF6.6050305@verizon.net>
Fantastic... looks promising, test-identify-packet is running w/o issue,
and boots, so far, as well. I will further test with a number of warm
and cold boots over the next several days to see if anything crops up.
I'm very grateful for your time and efforts with this, thanks again,
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);
>
>
next prev parent reply other threads:[~2011-01-18 21:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-06 22:02 Early-boot kernel panics from udev-165/extras/ata_id/ata_id.c John Stanley
2011-01-06 22:29 ` Greg KH
2011-01-07 2:13 ` Robby Workman
2011-01-07 8:06 ` Ozan Çağlayan
2011-01-10 8:10 ` Hannes Reinecke
2011-01-10 11:35 ` Ozan Çağlayan
2011-01-11 13:25 ` Tejun Heo
2011-01-17 3:53 ` John Stanley
2011-01-17 4:03 ` John Stanley
2011-01-17 5:07 ` John Stanley
2011-01-17 15:27 ` Tejun Heo
2011-01-17 15:28 ` Tejun Heo
2011-01-18 3:38 ` John Stanley
2011-01-18 15:09 ` Tejun Heo
2011-01-18 21:48 ` John Stanley [this message]
2011-01-19 2:07 ` Brad Price
2011-01-19 20:20 ` John Stanley
2011-01-20 12:59 ` [PATCH #upstream-fixes] libata: set queue DMA alignment to sector Tejun Heo
2011-01-20 12:59 ` [PATCH #upstream-fixes] libata: set queue DMA alignment to sector size for ATAPI too Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D360AC1.5040407@verizon.net \
--to=jpsinthemix@verizon.net \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.