* [PATCH] libata: fix boot panic with SATAPI devices on non-SFF HBAs
@ 2008-04-18 18:18 James Bottomley
2008-04-19 13:34 ` walt
0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2008-04-18 18:18 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-ide, linux-scsi
Current 2.6.25 git head now panics reliably on boot if you have a SATAPI
device connected.
The problem was introduced by the libata merge trying to pull out all
the SFF code into a separate module. Unfortunately, if you're a satapi
device you usually need to call atapi_request_sense, which has a bare
invocation of a SFF callback which is NULL on non-SFF HBAs. Fix this by
making the call conditional.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
---
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 784ac41..f3c69a8 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -2390,7 +2390,8 @@ static void atapi_request_sense(struct ata_queued_cmd *qc)
memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
#ifdef CONFIG_ATA_SFF
- ap->ops->sff_tf_read(ap, &qc->tf);
+ if (ap->ops->sff_tf_read)
+ ap->ops->sff_tf_read(ap, &qc->tf);
#endif
/* fill these in, for the case where they are -not- overwritten */
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] libata: fix boot panic with SATAPI devices on non-SFF HBAs
2008-04-18 18:18 [PATCH] libata: fix boot panic with SATAPI devices on non-SFF HBAs James Bottomley
@ 2008-04-19 13:34 ` walt
2008-04-19 14:08 ` James Bottomley
0 siblings, 1 reply; 3+ messages in thread
From: walt @ 2008-04-19 13:34 UTC (permalink / raw)
To: linux-scsi; +Cc: linux-ide
James Bottomley wrote:
> Current 2.6.25 git head now panics reliably on boot if you have a SATAPI
> device connected.
>
> The problem was introduced by the libata merge trying to pull out all
> the SFF code into a separate module...
Hi James,
When I saw your commit I thought it would fix the panic introduced by Tejun's
commit <305d2a1a>, but no luck.
I have a pata drive connected to a sata controller using a plugin adapter.
After Tejun's commit the kernel panics with unknown-block (8,9) instead of
mounting /dev/sda9. Is this the scenario your patch is intended to fix?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] libata: fix boot panic with SATAPI devices on non-SFF HBAs
2008-04-19 13:34 ` walt
@ 2008-04-19 14:08 ` James Bottomley
0 siblings, 0 replies; 3+ messages in thread
From: James Bottomley @ 2008-04-19 14:08 UTC (permalink / raw)
To: walt; +Cc: linux-scsi, linux-ide
On Sat, 2008-04-19 at 06:34 -0700, walt wrote:
> James Bottomley wrote:
> > Current 2.6.25 git head now panics reliably on boot if you have a SATAPI
> > device connected.
> >
> > The problem was introduced by the libata merge trying to pull out all
> > the SFF code into a separate module...
>
> Hi James,
>
> When I saw your commit I thought it would fix the panic introduced by Tejun's
> commit <305d2a1a>, but no luck.
>
> I have a pata drive connected to a sata controller using a plugin adapter.
> After Tejun's commit the kernel panics with unknown-block (8,9) instead of
> mounting /dev/sda9. Is this the scenario your patch is intended to fix?
If it's a panic with a SATA drive, then no it wouldn't ... the problem I
fixed was in SATAPI only (That's CD/DVD/Tape devices). If you actually
post the boot log and panic, linux-ide and Tejun might be able to help.
Your brief snippet indicates the controller isn't finding sda, I think.
James
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-19 14:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-18 18:18 [PATCH] libata: fix boot panic with SATAPI devices on non-SFF HBAs James Bottomley
2008-04-19 13:34 ` walt
2008-04-19 14:08 ` James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox