* Re: linux-next: Tree for Nov 27 (scsi/aha1542)
[not found] <20181127152539.55426063@canb.auug.org.au>
@ 2018-11-28 4:14 ` Randy Dunlap
2018-11-28 4:38 ` Stephen Rothwell
0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2018-11-28 4:14 UTC (permalink / raw)
To: Stephen Rothwell, Linux Next Mailing List
Cc: Linux Kernel Mailing List, linux-scsi
On 11/26/18 8:25 PM, Stephen Rothwell wrote:
> Hi all,
>
> Changes since 20181126:
>
on i386:
ERROR: "__udivdi3" [drivers/scsi/aha1542.ko] undefined!
somewhere in aha1542_interrupt() according to objdump.
--
~Randy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: Tree for Nov 27 (scsi/aha1542)
2018-11-28 4:14 ` linux-next: Tree for Nov 27 (scsi/aha1542) Randy Dunlap
@ 2018-11-28 4:38 ` Stephen Rothwell
2018-11-28 5:41 ` James Bottomley
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2018-11-28 4:38 UTC (permalink / raw)
To: Randy Dunlap
Cc: Linux Next Mailing List, Linux Kernel Mailing List, linux-scsi,
Christoph Hellwig
[-- Attachment #1: Type: text/plain, Size: 468 bytes --]
Hi all,
On Tue, 27 Nov 2018 20:14:58 -0800 Randy Dunlap <rdunlap@infradead.org> wrote:
>
> On 11/26/18 8:25 PM, Stephen Rothwell wrote:
> > Hi all,
> >
> > Changes since 20181126:
> >
>
> on i386:
>
> ERROR: "__udivdi3" [drivers/scsi/aha1542.ko] undefined!
>
> somewhere in aha1542_interrupt() according to objdump.
Presumably caused by commit
1794ef2b150d ("scsi: aha1542: convert to DMA mapping API")
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: Tree for Nov 27 (scsi/aha1542)
2018-11-28 4:38 ` Stephen Rothwell
@ 2018-11-28 5:41 ` James Bottomley
2018-11-28 6:54 ` Christoph Hellwig
2018-11-28 7:11 ` Randy Dunlap
0 siblings, 2 replies; 5+ messages in thread
From: James Bottomley @ 2018-11-28 5:41 UTC (permalink / raw)
To: Stephen Rothwell, Randy Dunlap
Cc: Linux Next Mailing List, Linux Kernel Mailing List, linux-scsi,
Christoph Hellwig
[-- Attachment #1: Type: text/plain, Size: 1387 bytes --]
On Wed, 2018-11-28 at 15:38 +1100, Stephen Rothwell wrote:
> Hi all,
>
> On Tue, 27 Nov 2018 20:14:58 -0800 Randy Dunlap <rdunlap@infradead.or
> g> wrote:
> >
> > On 11/26/18 8:25 PM, Stephen Rothwell wrote:
> > > Hi all,
> > >
> > > Changes since 20181126:
> > >
> >
> > on i386:
> >
> > ERROR: "__udivdi3" [drivers/scsi/aha1542.ko] undefined!
> >
> > somewhere in aha1542_interrupt() according to objdump.
>
> Presumably caused by commit
>
> 1794ef2b150d ("scsi: aha1542: convert to DMA mapping API")
Yes, it's because dma_addr_t can be u64 on pae systems but
isa_virt_to_bus only ever returns unsigned long (because an ISA
physical address can only be 24 bits).
I think this is the fix; there doesn't seem to be much point converting
to do_div given all the limitations.
James
---
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index a9c29757172f..afb693d7b44f 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -325,7 +325,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
};
- mbo = (scsi2int(mb[mbi].ccbptr) - aha1542->ccb_handle) / sizeof(struct ccb);
+ mbo = (scsi2int(mb[mbi].ccbptr) - (unsigned long)aha1542->ccb_handle) / sizeof(struct ccb);
mbistatus = mb[mbi].status;
mb[mbi].status = 0;
aha1542->aha1542_last_mbi_used = mbi;
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: linux-next: Tree for Nov 27 (scsi/aha1542)
2018-11-28 5:41 ` James Bottomley
@ 2018-11-28 6:54 ` Christoph Hellwig
2018-11-28 7:11 ` Randy Dunlap
1 sibling, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2018-11-28 6:54 UTC (permalink / raw)
To: James Bottomley
Cc: Stephen Rothwell, Randy Dunlap, Linux Next Mailing List,
Linux Kernel Mailing List, linux-scsi, Christoph Hellwig
On Tue, Nov 27, 2018 at 09:41:24PM -0800, James Bottomley wrote:
> Yes, it's because dma_addr_t can be u64 on pae systems but
> isa_virt_to_bus only ever returns unsigned long (because an ISA
> physical address can only be 24 bits).
>
> I think this is the fix; there doesn't seem to be much point converting
> to do_div given all the limitations.
Yes, something along these lines should fix it. I don't have the code
in front of me, but I vaguely remember there is a second division like
this, though. It might be worth to factor the calculation into a helper
with a comment like the message above explaining it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: Tree for Nov 27 (scsi/aha1542)
2018-11-28 5:41 ` James Bottomley
2018-11-28 6:54 ` Christoph Hellwig
@ 2018-11-28 7:11 ` Randy Dunlap
1 sibling, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2018-11-28 7:11 UTC (permalink / raw)
To: James Bottomley, Stephen Rothwell
Cc: Linux Next Mailing List, Linux Kernel Mailing List, linux-scsi,
Christoph Hellwig
On 11/27/18 9:41 PM, James Bottomley wrote:
> On Wed, 2018-11-28 at 15:38 +1100, Stephen Rothwell wrote:
>> Hi all,
>>
>> On Tue, 27 Nov 2018 20:14:58 -0800 Randy Dunlap <rdunlap@infradead.or
>> g> wrote:
>>>
>>> On 11/26/18 8:25 PM, Stephen Rothwell wrote:
>>>> Hi all,
>>>>
>>>> Changes since 20181126:
>>>>
>>>
>>> on i386:
>>>
>>> ERROR: "__udivdi3" [drivers/scsi/aha1542.ko] undefined!
>>>
>>> somewhere in aha1542_interrupt() according to objdump.
>>
>> Presumably caused by commit
>>
>> 1794ef2b150d ("scsi: aha1542: convert to DMA mapping API")
>
> Yes, it's because dma_addr_t can be u64 on pae systems but
> isa_virt_to_bus only ever returns unsigned long (because an ISA
> physical address can only be 24 bits).
>
> I think this is the fix; there doesn't seem to be much point converting
> to do_div given all the limitations.
>
> James
Yes, that works. Thanks.
Acked-by: Randy Dunlap <rdunlap@infradead.org>
> ---
>
> diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
> index a9c29757172f..afb693d7b44f 100644
> --- a/drivers/scsi/aha1542.c
> +++ b/drivers/scsi/aha1542.c
> @@ -325,7 +325,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
> return IRQ_HANDLED;
> };
>
> - mbo = (scsi2int(mb[mbi].ccbptr) - aha1542->ccb_handle) / sizeof(struct ccb);
> + mbo = (scsi2int(mb[mbi].ccbptr) - (unsigned long)aha1542->ccb_handle) / sizeof(struct ccb);
> mbistatus = mb[mbi].status;
> mb[mbi].status = 0;
> aha1542->aha1542_last_mbi_used = mbi;
>
--
~Randy
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-11-28 7:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20181127152539.55426063@canb.auug.org.au>
2018-11-28 4:14 ` linux-next: Tree for Nov 27 (scsi/aha1542) Randy Dunlap
2018-11-28 4:38 ` Stephen Rothwell
2018-11-28 5:41 ` James Bottomley
2018-11-28 6:54 ` Christoph Hellwig
2018-11-28 7:11 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).