Skip to contentSkip to conversation

Removing BROKEN scsi drivers

RFC PATCH In review Andi Kleen 13 participants 46 messages Oct 5, 2005 – Apr 29, 2007

Subsystems (3)
lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

In 2.6.14rc3:

linux/drivers/scsi> grep -c BROKEN Kconfig
11

There are a lot of SCSI drivers who have been marked BROKEN forever. Or at least for all of 2.6 and one would expect if there are users left they would have fixed them by now. Would it make sense to remove them?

In particular:

SCSI_ADVANSYS - vendor went out of market afaik. Probably not many left. SCSI_CPQFCTS - suboption of another driver, incredibly ugly code defying all coding standards.
SCSI_EATA_PIO - really old ISA cards. Probably all left over cards are way over their MTBF by now.
SCSI_SEAGATE - extremly scary code, i doubt there is any such card left SCSI_MCA_53C9X - BROKEN_ON_SMP only. Ok I guess there are no SMP Micro Channel systems.
SCSI_QLOGIC_ISP - afaik there is a newer driver for this SCSI_AMIGA7XX - no maintainer, broken forever
ATARI_SCSI - no maintainer, broken forever
MVME16x_SCSI - no maintainer, broken forever
BVME6000_SCSI - same
SUN3_SCSI - sun3 never worked in mainline anyways

I think they could all go except perhaps the MCA driver. Or at least added to Documentation/feature-removal-schedule.txt and then removed in a few months.

-Andi

#1 lore raw
Quoted 8 lines · Andi Kleen

In 2.6.14rc3:

linux/drivers/scsi> grep -c BROKEN Kconfig
11

There are a lot of SCSI drivers who have been marked BROKEN forever. Or at least for all of 2.6 and one would expect if there are users left they would have fixed them by now. Would it make sense to remove them?

I'd say so yes

Quoted 3 lines

I think they could all go except perhaps the MCA driver. Or at least added to Documentation/feature-removal-schedule.txt and then removed in a few months.

sounds like the feature-removal should be done now before 2.6.14, and the removal right after 2.6.14 goes out (if anyone later wants to revive a driver they can always find the driver in the 2.6.14 tarbal after all)

#2 lore raw
In reply to Andi Kleen
Quoted 3 lines · Andi Kleen

SCSI_AMIGA7XX - no maintainer, broken forever
MVME16x_SCSI - no maintainer, broken forever
BVME6000_SCSI - same

I don't think there's any point in deleting these. I'm not even sure why they're marked BROKEN. They share 99% of their code with drivers which are working. And I thought Richard Hirst was maintaining them ...

#3 lore raw
Quoted 8 lines · Matthew Wilcox
Quoted 3 lines · Andi Kleen

SCSI_AMIGA7XX - no maintainer, broken forever
MVME16x_SCSI - no maintainer, broken forever
BVME6000_SCSI - same

I don't think there's any point in deleting these. I'm not even sure why they're marked BROKEN. They share 99% of their code with drivers which are working. And I thought Richard Hirst was maintaining them ...

They don't. All these use the broken and obsolete 53c7xx driver, not James new 53c700 core. The driver should be easy to reimplement based on the 53x700 for someone who has the hardware and cares about it.

#4 lore raw
Quoted 6 lines · Christoph Hellwig
Quoted 5 lines · Matthew Wilcox
Quoted 3 lines · Andi Kleen

SCSI_AMIGA7XX - no maintainer, broken forever
MVME16x_SCSI - no maintainer, broken forever
BVME6000_SCSI - same

Quoted 7 lines
Quoted 3 lines

I don't think there's any point in deleting these. I'm not even sure why they're marked BROKEN. They share 99% of their code with drivers which are working. And I thought Richard Hirst was maintaining them ...

They don't. All these use the broken and obsolete 53c7xx driver, not James new 53c700 core. The driver should be easy to reimplement based on the 53x700 for someone who has the hardware and cares about it.

I never claimed to maintain the amiga stuff, but you are right that they all use the 53c7xx driver that I originally created. The sensible thing to do is to migrate those systems to use James 53c700 core, but it seems wise to poll the linux-m68k list before removing them. I don't do much with my VME hardware these days but I know there have been patches posted for the serial driver recently so maybe someone has the scsi working.

Richard

#5 lore raw
Quoted 15 lines · Richard Hirst
Quoted 6 lines · Christoph Hellwig
Quoted 5 lines · Matthew Wilcox
Quoted 3 lines · Andi Kleen

SCSI_AMIGA7XX - no maintainer, broken forever
MVME16x_SCSI - no maintainer, broken forever
BVME6000_SCSI - same

Quoted 7 lines
Quoted 3 lines

I don't think there's any point in deleting these. I'm not even sure why they're marked BROKEN. They share 99% of their code with drivers which are working. And I thought Richard Hirst was maintaining them ...

They don't. All these use the broken and obsolete 53c7xx driver, not James new 53c700 core. The driver should be easy to reimplement based on the 53x700 for someone who has the hardware and cares about it.

Quoted 7 lines

I never claimed to maintain the amiga stuff, but you are right that they all use the 53c7xx driver that I originally created. The sensible thing to do is to migrate those systems to use James 53c700 core, but it seems wise to poll the linux-m68k list before removing them. I don't do much with my VME hardware these days but I know there have been patches posted for the serial driver recently so maybe someone has the scsi working.

I have at least the 53c7xx driver and the MVME16X driver working, the Amiga and BVME stuff is untested (but does compile).

I patched the 53c7xx core to get it to work again, but the patch is ugly and uses some mid level SCSI driver internals, which it shouldn't. It's currently only present in the m68k CVS repository.

Are you sure it's that easy to use the new 53c700 core? These boards all have 53c710 chips, and are quite some changes in the 53c7xx driver compared to the 53c8xx driver it originated from.

Kind regards,

Kars.

#6 lore raw
Quoted 24 lines · Kars de Jong
Quoted 15 lines · Richard Hirst
Quoted 6 lines · Christoph Hellwig
Quoted 5 lines · Matthew Wilcox
Quoted 3 lines · Andi Kleen

SCSI_AMIGA7XX - no maintainer, broken forever
MVME16x_SCSI - no maintainer, broken forever
BVME6000_SCSI - same

Quoted 7 lines
Quoted 3 lines

I don't think there's any point in deleting these. I'm not even sure why they're marked BROKEN. They share 99% of their code with drivers which are working. And I thought Richard Hirst was maintaining them ...

They don't. All these use the broken and obsolete 53c7xx driver, not James new 53c700 core. The driver should be easy to reimplement based on the 53x700 for someone who has the hardware and cares about it.

Quoted 7 lines

I never claimed to maintain the amiga stuff, but you are right that they all use the 53c7xx driver that I originally created. The sensible thing to do is to migrate those systems to use James 53c700 core, but it seems wise to poll the linux-m68k list before removing them. I don't do much with my VME hardware these days but I know there have been patches posted for the serial driver recently so maybe someone has the scsi working.

Quoted 2 lines

I have at least the 53c7xx driver and the MVME16X driver working, the Amiga and BVME stuff is untested (but does compile).

Great :-)

Quoted 7 lines

I patched the 53c7xx core to get it to work again, but the patch is ugly and uses some mid level SCSI driver internals, which it shouldn't. It's currently only present in the m68k CVS repository.

Are you sure it's that easy to use the new 53c700 core? These boards all have 53c710 chips, and are quite some changes in the 53c7xx driver compared to the 53c8xx driver it originated from.

The 53c700 core code handles 53c710 as well, so it should be easy. Not that I've actually tried..

Richard

#7 lore raw
In reply to Kars de Jong
Quoted 10 lines · Kars de Jong

I have at least the 53c7xx driver and the MVME16X driver working, the Amiga and BVME stuff is untested (but does compile).

I patched the 53c7xx core to get it to work again, but the patch is ugly and uses some mid level SCSI driver internals, which it shouldn't. It's currently only present in the m68k CVS repository.

Are you sure it's that easy to use the new 53c700 core? These boards all have 53c710 chips, and are quite some changes in the 53c7xx driver compared to the 53c8xx driver it originated from.

The 53c700 driver is a bit misnamed, it also has a 710 mode which is set by a flag. It's actually in common use driving three different chipsets:

53c700: parisc 715 machines
53c700-66: Voyager systems
53c710: Voyager and parisc 712 systems

For the 53c720, we're using the ncr53c8xx driver on both voyager and parisc.

James

#8 lore raw
Quoted 12 lines · James Bottomley
Quoted 10 lines · Kars de Jong

I have at least the 53c7xx driver and the MVME16X driver working, the Amiga and BVME stuff is untested (but does compile).

I patched the 53c7xx core to get it to work again, but the patch is ugly and uses some mid level SCSI driver internals, which it shouldn't. It's currently only present in the m68k CVS repository.

Are you sure it's that easy to use the new 53c700 core? These boards all have 53c710 chips, and are quite some changes in the 53c7xx driver compared to the 53c8xx driver it originated from.

Quoted 7 lines

The 53c700 driver is a bit misnamed, it also has a 710 mode which is set by a flag. It's actually in common use driving three different chipsets:

53c700: parisc 715 machines
53c700-66: Voyager systems
53c710: Voyager and parisc 712 systems

And PC. I've two of them running in EISA slots of an old Compaq 486 using sim710 driver.

Richard, remember this machine?

Eike

#9 lore raw
In reply to Kars de Jong
Quoted 24 lines · Kars de Jong
Quoted 15 lines · Richard Hirst
Quoted 6 lines · Christoph Hellwig
Quoted 5 lines · Matthew Wilcox
Quoted 3 lines · Andi Kleen

SCSI_AMIGA7XX - no maintainer, broken forever
MVME16x_SCSI - no maintainer, broken forever
BVME6000_SCSI - same

Quoted 7 lines
Quoted 3 lines

I don't think there's any point in deleting these. I'm not even sure why they're marked BROKEN. They share 99% of their code with drivers which are working. And I thought Richard Hirst was maintaining them ...

They don't. All these use the broken and obsolete 53c7xx driver, not James new 53c700 core. The driver should be easy to reimplement based on the 53x700 for someone who has the hardware and cares about it.

Quoted 7 lines

I never claimed to maintain the amiga stuff, but you are right that they all use the 53c7xx driver that I originally created. The sensible thing to do is to migrate those systems to use James 53c700 core, but it seems wise to poll the linux-m68k list before removing them. I don't do much with my VME hardware these days but I know there have been patches posted for the serial driver recently so maybe someone has the scsi working.

Quoted 6 lines

I have at least the 53c7xx driver and the MVME16X driver working, the Amiga and BVME stuff is untested (but does compile).

I patched the 53c7xx core to get it to work again, but the patch is ugly and uses some mid level SCSI driver internals, which it shouldn't. It's currently only present in the m68k CVS repository.

Indeed:

http://linux-m68k-cvs.ubb.ca/~geert/linux-m68k-2.6.x-merging/POSTPONED/520-53c7xx.diff

It was rejected upstream because patches for the 53c7xx driver are no longer accepted. we should use the 53c700 core instead.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#10 lore raw
Quoted 32 lines · Geert Uytterhoeven
Quoted 24 lines · Kars de Jong
Quoted 15 lines · Richard Hirst
Quoted 6 lines · Christoph Hellwig
Quoted 5 lines · Matthew Wilcox
Quoted 3 lines · Andi Kleen

SCSI_AMIGA7XX - no maintainer, broken forever
MVME16x_SCSI - no maintainer, broken forever
BVME6000_SCSI - same

Quoted 7 lines
Quoted 3 lines

I don't think there's any point in deleting these. I'm not even sure why they're marked BROKEN. They share 99% of their code with drivers which are working. And I thought Richard Hirst was maintaining them ...

They don't. All these use the broken and obsolete 53c7xx driver, not James new 53c700 core. The driver should be easy to reimplement based on the 53x700 for someone who has the hardware and cares about it.

Quoted 7 lines

I never claimed to maintain the amiga stuff, but you are right that they all use the 53c7xx driver that I originally created. The sensible thing to do is to migrate those systems to use James 53c700 core, but it seems wise to poll the linux-m68k list before removing them. I don't do much with my VME hardware these days but I know there have been patches posted for the serial driver recently so maybe someone has the scsi working.

Quoted 6 lines

I have at least the 53c7xx driver and the MVME16X driver working, the Amiga and BVME stuff is untested (but does compile).

I patched the 53c7xx core to get it to work again, but the patch is ugly and uses some mid level SCSI driver internals, which it shouldn't. It's currently only present in the m68k CVS repository.

Quoted 6 lines

Indeed:

http://linux-m68k-cvs.ubb.ca/~geert/linux-m68k-2.6.x-merging/POSTPONED/520-53c7xx.diff

It was rejected upstream because patches for the 53c7xx driver are no longer accepted. we should use the 53c700 core instead.

Yep; I'll find time later this month to look at switching to use 53c700.

Richard

Quoted 14 lines

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#11 lore raw
Quoted 9 lines · Richard Hirst
Quoted 6 lines · Geert Uytterhoeven

Indeed:

http://linux-m68k-cvs.ubb.ca/~geert/linux-m68k-2.6.x-merging/POSTPONED/520-53c7xx.diff

It was rejected upstream because patches for the 53c7xx driver are no longer accepted. we should use the 53c700 core instead.

Yep; I'll find time later this month to look at switching to use 53c700.

I already did that, including the modifications needed to use the iomap interface on m68k. I'll hopefully get around to testing it on an MVME167 this weekend.

Kind regards,

Kars.

#12 lore raw
Quoted 8 lines · Kars de Jong
Quoted 4 lines
Quoted 2 lines

It was rejected upstream because patches for the 53c7xx driver are no longer accepted. we should use the 53c700 core instead.

Yep; I'll find time later this month to look at switching to use 53c700.

I already did that, including the modifications needed to use the iomap interface on m68k. I'll hopefully get around to testing it on an MVME167 this weekend.

Did you make any progress on this?

#13 lore raw
Quoted 8 lines · Christoph Hellwig
Quoted 6 lines · Kars de Jong
Quoted 3 lines
Quoted 2 lines

It was rejected upstream because patches for the 53c7xx driver are no longer accepted. we should use the 53c700 core instead.

Yep; I'll find time later this month to look at switching to use 53c700.

I already did that, including the modifications needed to use the iomap interface on m68k. I'll hopefully get around to testing it on an MVME167 this weekend.

Did you make any progress on this?

I guess he made... Kars gave me a kernel image for Amiga:

53c700: Version 2.8 By [email protected]
scsi0: 53c710 rev 2
53c700: dmode=80 dcntl=01 ctest7=02
scsi0 : WarpEngine 40xx

spice:/home/ij# uptime
 11:13:14 up 4 days, 14:59,  3 users,  load average: 0.02, 0.20, 0.13

So far, I haven't experienced any problems with that new driver. I intend to try that kernel on an Amiga 4000T with its implementation of that chip (A4091-alike)...

Signature · 4 lines
Ciao...                //        Fon: 0381-2744150 
      Ingo           \X/         SIP: [email protected]

gpg pubkey: http://www.juergensmann.de/ij/public_key.asc
#14 lore raw
Quoted 9 lines · Ingo Juergensmann
Quoted 1 line

Did you make any progress on this?

I guess he made... Kars gave me a kernel image for Amiga:

53c700: Version 2.8 By [email protected]
scsi0: 53c710 rev 2
53c700: dmode=80 dcntl=01 ctest7=02
scsi0 : WarpEngine 40xx

Quoted 6 lines
spice:/home/ij# uptime
 11:13:14 up 4 days, 14:59,  3 users,  load average: 0.02, 0.20, 0.13

So far, I haven't experienced any problems with that new driver. I intend to try that kernel on an Amiga 4000T with its implementation of that chip (A4091-alike)...

Very nice. Kars, could you send your patches to linux-scsi please?

#15 lore raw
Quoted 10 lines · Christoph Hellwig
Quoted 9 lines · Ingo Juergensmann
Quoted 1 line

Did you make any progress on this?

I guess he made... Kars gave me a kernel image for Amiga:

53c700: Version 2.8 By [email protected]
scsi0: 53c710 rev 2
53c700: dmode=80 dcntl=01 ctest7=02
scsi0 : WarpEngine 40xx

Quoted 8 lines
Quoted 6 lines
spice:/home/ij# uptime
 11:13:14 up 4 days, 14:59,  3 users,  load average: 0.02, 0.20, 0.13

So far, I haven't experienced any problems with that new driver. I intend to try that kernel on an Amiga 4000T with its implementation of that chip (A4091-alike)...

Very nice. Kars, could you send your patches to linux-scsi please?

Between us it seems Kars and I have this driver working on Amiga, MVME, and BVME boards. That is everything that used the old 53c7xx driver. I don't believe there is a combined set of patches yet (at least, I havn't seen the patches for Amiga). One complication is that we're relying on some m68k-specific dma support patches from Roman Zippel that are not yet integrated.

Richard

#16 lore raw

Hi,

Quoted 8 lines · Richard Hirst
Quoted 1 line

Very nice. Kars, could you send your patches to linux-scsi please?

Between us it seems Kars and I have this driver working on Amiga, MVME, and BVME boards. That is everything that used the old 53c7xx driver. I don't believe there is a combined set of patches yet (at least, I havn't seen the patches for Amiga). One complication is that we're relying on some m68k-specific dma support patches from Roman Zippel that are not yet integrated.

Where I'm waiting for upstream blockage to get resolved before I continue with this.

bye, Roman

#17 lore raw
In reply to Richard Hirst
Quoted 18 lines · Richard Hirst
Quoted 17 lines · Christoph Hellwig
Quoted 15 lines · Ingo Juergensmann
Quoted 1 line

Did you make any progress on this?

I guess he made... Kars gave me a kernel image for Amiga:

53c700: Version 2.8 By [email protected]
scsi0: 53c710 rev 2
53c700: dmode=80 dcntl=01 ctest7=02
scsi0 : WarpEngine 40xx

spice:/home/ij# uptime
 11:13:14 up 4 days, 14:59,  3 users,  load average: 0.02, 0.20, 0.13

So far, I haven't experienced any problems with that new driver. I intend to try that kernel on an Amiga 4000T with its implementation of that chip (A4091-alike)...

Quoted 8 lines
Quoted 1 line

Very nice. Kars, could you send your patches to linux-scsi please?

Between us it seems Kars and I have this driver working on Amiga, MVME, and BVME boards. That is everything that used the old 53c7xx driver. I don't believe there is a combined set of patches yet (at least, I havn't seen the patches for Amiga). One complication is that we're relying on some m68k-specific dma support patches from Roman Zippel that are not yet integrated.

Indeed, and there's issues with the iomap interface to solve as well.

Also, I don't know the proper chip register settings for all supported boards yet (hence the printk() with register settings).

With all m68k 53c700 implementations currently supported there should be no byteswapping done in io{read,write}32(), but that doesn't hold for each bus.

So until we can specify in some way how the io{read,write}{16,32}() function should behave on a certain memory region, I see no way to integrate this cleanly. For now I am inclined to do something like this in 53c700.h:

#ifdef CONFIG_M68K
        iowrite32be(bS_to_io(value), hostdata->base + reg);
#else
        iowrite32(bS_to_io(value), hostdata->base + reg);

#endif

etc.

IMHO that's cleaner than hardcoding these functions to do no byteswapping at all in include/asm-m68k/io.h. Plus that breaks when a multi-config kernel is built (like one with PCMCIA and this SCSI driver, because the Amiga PCMCIA implementation does need byteswapping). Much like what you get now when you build a kernel with APNE and ZORRO8390 drivers for instance.

Comments, anyone?

Kind regards,

Kars.

#18 lore raw
Quoted 15 lines · Kars de Jong

With all m68k 53c700 implementations currently supported there should be no byteswapping done in io{read,write}32(), but that doesn't hold for each bus.

So until we can specify in some way how the io{read,write}{16,32}() function should behave on a certain memory region, I see no way to integrate this cleanly. For now I am inclined to do something like this in 53c700.h:

#ifdef CONFIG_M68K
        iowrite32be(bS_to_io(value), hostdata->base + reg);
#else
        iowrite32(bS_to_io(value), hostdata->base + reg);

#endif

Quoted 8 lines

etc.

IMHO that's cleaner than hardcoding these functions to do no byteswapping at all in include/asm-m68k/io.h. Plus that breaks when a multi-config kernel is built (like one with PCMCIA and this SCSI driver, because the Amiga PCMCIA implementation does need byteswapping). Much like what you get now when you build a kernel with APNE and ZORRO8390 drivers for instance.

I thought that was what the bS_to_io() and friends were for.

In any case, I agree with you. The iomap call should let you specify whether this is a big-endian or little-endian region. Unfortunately, James Bottomley disagreed and we now have the ioread16be family of functions.

#19 lore raw
In reply to Kars de Jong
Quoted 14 lines · Kars de Jong

Indeed, and there's issues with the iomap interface to solve as well.

Also, I don't know the proper chip register settings for all supported boards yet (hence the printk() with register settings).

With all m68k 53c700 implementations currently supported there should be no byteswapping done in io{read,write}32(), but that doesn't hold for each bus.

So until we can specify in some way how the io{read,write}{16,32}() function should behave on a certain memory region, I see no way to integrate this cleanly. For now I am inclined to do something like this in 53c700.h:

Quoted 5 lines
#ifdef CONFIG_M68K
        iowrite32be(bS_to_io(value), hostdata->base + reg);
#else
        iowrite32(bS_to_io(value), hostdata->base + reg);

#endif

The 53c700 already has a rather awkward mechanism to deal with different bus byte orders, I'd suggest you use that now and switch the driver to use ioread*be later, without introducing arch-specific config symbols.

Anyway, could you folks please submit what you have now? The 53c7xx hasn't worked ever in 2.6.x, and we're gonna remove it for 2.6.16. It would be nice to keep the m68k glue drivers switched over to use 53c700 even if there's still some odd hacks required to actually make it work - we'll surely sort them out once the basics are in.

#20 lore raw
Quoted 3 lines · Christoph Hellwig

The 53c700 already has a rather awkward mechanism to deal with different bus byte orders, I'd suggest you use that now and switch the driver to use ioread*be later, without introducing arch-specific config symbols.

I don't really understand the current mechanism. It seems to result in different behaviour for BE systems depending on the definition of CONFIG_53C700_LE_ON_BE.

I would have expected the behaviour on BE systems without defining CONFIG_53C700_LE_ON_BE to be the same as on BE systems with CONFIG_53C700_LE_ON_BE defined but with hostdata->force_le_on_be set to 0.

Was this driver ever used on BE systems without CONFIG_53C700_LE_ON_BE being defined?

For reference:

BE with CONFIG_53C700_LE_ON_BE defined but hostdata->force_le_on_be set to 0:

/* This is terrible, but there's no raw version of ioread32. That means
* that on a be board we swap twice (once in ioread32 and once again to
* get the value correct) */
#define bS_to_io(x) ((hostdata->force_le_on_be) ? (x) : cpu_to_le32(x))

evaluates to

                                      0   ---------->       cpu_to_le32(x)

And without CONFIG_53C700_LE_ON_BE defined:

#define bS_to_io(x) (x)

I think this last define should be cpu_to_le32() as well, then the driver would work on m68k out-of-the-box.

James, can you comment on this?

Quoted 5 lines

Anyway, could you folks please submit what you have now? The 53c7xx hasn't worked ever in 2.6.x, and we're gonna remove it for 2.6.16. It would be nice to keep the m68k glue drivers switched over to use 53c700 even if there's still some odd hacks required to actually make it work - we'll surely sort them out once the basics are in.

They wouldn't compile, because I'm not going to submit Romans DMA patch myself.

Kind regards,

Kars.

#21 lore raw
Quoted 3 lines · Kars de Jong

I don't really understand the current mechanism. It seems to result in different behaviour for BE systems depending on the definition of CONFIG_53C700_LE_ON_BE.

I think you misunderstand the meaning of that symbol. It means "Support little endian chips on a big endian processor". Without it set, the driver supports only little endian chips on little endian processors and big endian chips on big endian processors.

Quoted 2 lines

Was this driver ever used on BE systems without CONFIG_53C700_LE_ON_BE being defined?

I doubt it.

#22 lore raw
In reply to Kars de Jong
Quoted 25 lines · Kars de Jong

I don't really understand the current mechanism. It seems to result in different behaviour for BE systems depending on the definition of CONFIG_53C700_LE_ON_BE.

I would have expected the behaviour on BE systems without defining CONFIG_53C700_LE_ON_BE to be the same as on BE systems with CONFIG_53C700_LE_ON_BE defined but with hostdata->force_le_on_be set to 0.

Was this driver ever used on BE systems without CONFIG_53C700_LE_ON_BE being defined?

For reference:

BE with CONFIG_53C700_LE_ON_BE defined but hostdata->force_le_on_be set to 0:

/* This is terrible, but there's no raw version of ioread32. That means
* that on a be board we swap twice (once in ioread32 and once again to
* get the value correct) */
#define bS_to_io(x) ((hostdata->force_le_on_be) ? (x) : cpu_to_le32(x))

evaluates to

                                      0   ---------->       cpu_to_le32(x)
Quoted 8 lines

And without CONFIG_53C700_LE_ON_BE defined:

#define bS_to_io(x) (x)

I think this last define should be cpu_to_le32() as well, then the driver would work on m68k out-of-the-box.

James, can you comment on this?

OK, let me try to explain.

ioread/write32 came with a slight design flaw in that it *always* converts to LE. By and large, no-one notices this because almost every platform has the PCI bus, which is LE. However, PA also has the GSC bus, which is BE. We already introduced the ioread/write<n>be macros which work for a BE bus. You're right, the only current BE consumer of the driver is PA-RISC, which has a cockup on one of the 53c700 chips which is wired in LE mode on the BE GSC bus, so we need that flag.

I assume your problems is also that the 53c7x0 chip on the MAC is also on a BE bus, so I think what you want is another flag:

53c700_BE_BUS

which causes all the io macros to be ioread/write<n>be. Which will avoid the nasty double swap we do on PA.

James

#23 lore raw
Quoted 7 lines · James Bottomley

I assume your problems is also that the 53c7x0 chip on the MAC is also on a BE bus, so I think what you want is another flag:

53c700_BE_BUS

which causes all the io macros to be ioread/write<n>be. Which will avoid the nasty double swap we do on PA.

How about the attached. I've tested it out on parisc and it works fine ... in fact I'm tempted to commit it simply because we now avoid the double swap for every I/O operation.

James

drivers/scsi/53c700.h +13 -9
@@ -232,21 +232,23 @@ struct NCR_700_Host_Parameters {
 #ifdef CONFIG_53C700_LE_ON_BE
 #define bE	(hostdata->force_le_on_be ? 0 : 3)
 #define	bSWAP	(hostdata->force_le_on_be)
-/* This is terrible, but there's no raw version of ioread32.  That means
- * that on a be board we swap twice (once in ioread32 and once again to 
- * get the value correct) */
-#define bS_to_io(x)	((hostdata->force_le_on_be) ? (x) : cpu_to_le32(x))
+#define bEBus	(!hostdata->force_le_on_be)
 #elif defined(__BIG_ENDIAN)
 #define bE	3
 #define bSWAP	0
-#define bS_to_io(x)	(x)
 #elif defined(__LITTLE_ENDIAN)
 #define bE	0
 #define bSWAP	0
-#define bS_to_io(x)	(x)
 #else
 #error "__BIG_ENDIAN or __LITTLE_ENDIAN must be defined, did you include byteorder.h?"
 #endif
+#ifndef bEBus
+#ifdef CONFIG_53C700_BE_BUS)
+#define bEBus	1
+#else
+#define bEBus	0
+#endif
+#endif
 #define bS_to_cpu(x)	(bSWAP ? le32_to_cpu(x) : (x))
 #define bS_to_host(x)	(bSWAP ? cpu_to_le32(x) : (x))
 
@@ -460,14 +462,15 @@ NCR_700_readl(struct Scsi_Host *host, __
 {
 	const struct NCR_700_Host_Parameters *hostdata
 		= (struct NCR_700_Host_Parameters *)host->hostdata[0];
-	__u32 value = ioread32(hostdata->base + reg);
+	__u32 value = bEBus ? ioread32be(hostdata->base + reg) :
+		ioread32(hostdata->base + reg);
 #if 1
 	/* sanity check the register */
 	if((reg & 0x3) != 0)
 		BUG();
 #endif
 
-	return bS_to_io(value);
+	return value;
 }
 
 static inline void
@@ -491,7 +494,8 @@ NCR_700_writel(__u32 value, struct Scsi_
 		BUG();
 #endif
 
-	iowrite32(bS_to_io(value), hostdata->base + reg);
+	bEBus ? iowrite32be(value, hostdata->base + reg): 
+		iowrite32(value, hostdata->base + reg);
 }
 
 #endif
#24 lore raw
Quoted 4 lines · James Bottomley
Quoted 3 lines · James Bottomley

I assume your problems is also that the 53c7x0 chip on the MAC is also on a BE bus, so I think what you want is another flag:

Quoted 8 lines
Quoted 4 lines

53c700_BE_BUS

which causes all the io macros to be ioread/write<n>be. Which will avoid the nasty double swap we do on PA.

How about the attached. I've tested it out on parisc and it works fine ... in fact I'm tempted to commit it simply because we now avoid the double swap for every I/O operation.

Looks fine to me. I'll see if I can try it out on m68k tonight. The driver isn't used on MACs by the way, it's used on Amigas and VME single board computers.

Kind regards,

Kars.

#25 lore raw
Quoted 3 lines · Kars de Jong

Looks fine to me. I'll see if I can try it out on m68k tonight. The driver isn't used on MACs by the way, it's used on Amigas and VME single board computers.

I'll look forward to test it on my machines... :->

Signature · 4 lines
Ciao...                //        Fon: 0381-2744150 
      Ingo           \X/         SIP: [email protected]

gpg pubkey: http://www.juergensmann.de/ij/public_key.asc
#26 lore raw
In reply to James Bottomley
Quoted 3 lines · James Bottomley

How about the attached. I've tested it out on parisc and it works fine ... in fact I'm tempted to commit it simply because we now avoid the double swap for every I/O operation.

I've tested it on my MVME167, using the generic iomap() interface implementation, and it seems to work fine.

I noticed one thing in the patch:

Quoted 1 line

+#ifdef CONFIG_53C700_BE_BUS)

                              ^

There's a trailing ) there.

Ingo, can you test the kernel at
http://members.home.nl/karsdejong/vmlinuz-2.6.14-amiga-4 on your hardware? It also has NFS client and AFFS support.

Kind regards,

Kars.

#27 lore raw
Quoted 5 lines · Kars de Jong

I noticed one thing in the patch:

Quoted 1 line

+#ifdef CONFIG_53C700_BE_BUS)

                              ^

There's a trailing ) there.

Well .. since you'll be the first user of the config option, could you fix it when you add your driver ...

Thanks,

James

#28 lore raw
In reply to Kars de Jong
Quoted 7 lines · Kars de Jong
Quoted 3 lines · James Bottomley

How about the attached. I've tested it out on parisc and it works fine ... in fact I'm tempted to commit it simply because we now avoid the double swap for every I/O operation.

I've tested it on my MVME167, using the generic iomap() interface implementation, and it seems to work fine.

Hi Kars, do you have my changes for BMVE6000 too? It'd be nice to submit them all together, when we get to that stage.

Cheers,
Richard

Quoted 21 lines

I noticed one thing in the patch:

Quoted 1 line

+#ifdef CONFIG_53C700_BE_BUS)

                              ^

There's a trailing ) there.

Ingo, can you test the kernel at
http://members.home.nl/karsdejong/vmlinuz-2.6.14-amiga-4 on your hardware? It also has NFS client and AFFS support.

Kind regards,

Kars.

-
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#31 lore raw
In reply to Richard Hirst
Quoted 6 lines · Richard Hirst

Between us it seems Kars and I have this driver working on Amiga, MVME, and BVME boards. That is everything that used the old 53c7xx driver. I don't believe there is a combined set of patches yet (at least, I havn't seen the patches for Amiga). One complication is that we're relying on some m68k-specific dma support patches from Roman Zippel that are not yet integrated.

After only half a year of waiting the m68k dma api bits finally made it in..

Could you please submit your patches again now that everything should be in place?

#32 lore raw
Quoted 8 lines · Christoph Hellwig
Quoted 6 lines · Richard Hirst

Between us it seems Kars and I have this driver working on Amiga, MVME, and BVME boards. That is everything that used the old 53c7xx driver. I don't believe there is a combined set of patches yet (at least, I havn't seen the patches for Amiga). One complication is that we're relying on some m68k-specific dma support patches from Roman Zippel that are not yet integrated.

Quoted 4 lines

After only half a year of waiting the m68k dma api bits finally made it in..

Could you please submit your patches again now that everything should be in place?

I'm trying to figure out where we got to with this, but my problem is I never saw a patch from Kars that included Amiga and [BM]VME changes in one patch, and I only generated the [BM]VME parts. Also Kars changed things to work with the new "bEBus" option James added to the 53c700 driver.

Kars, do you have such a patch handy as a starting point, or even better, do you have a current patch that can go to liunx-scsi ?

Thanks,
Richard

#33 lore raw
Quoted 6 lines · Richard Hirst
Quoted 4 lines · Christoph Hellwig

After only half a year of waiting the m68k dma api bits finally made it in..

Could you please submit your patches again now that everything should be in place?

Quoted 8 lines

I'm trying to figure out where we got to with this, but my problem is I never saw a patch from Kars that included Amiga and [BM]VME changes in one patch, and I only generated the [BM]VME parts. Also Kars changed things to work with the new "bEBus" option James added to the 53c700 driver.

Kars, do you have such a patch handy as a starting point, or even better, do you have a current patch that can go to liunx-scsi ?

Yes, I have a current patch which integrates all of the above mentioned changes. Didn't get around to testing it yet with the integrated DMA API patches.

I hope to be able to send it later this week.

Kind regards,

Kars.

#34 lore raw
Quoted 5 lines · Kars de Jong

Yes, I have a current patch which integrates all of the above mentioned changes. Didn't get around to testing it yet with the integrated DMA API patches.

I hope to be able to send it later this week.

Any updates? Honestly, I do not plan to touch the current 53c7xx/etc mess in the upoming request_buffer transition, and unless the m68k folks provide the new 53c700-based driver I'll just submit a patch to rip 53c7xx and users out without replacement.

#35 lore raw
Quoted 11 lines · Christoph Hellwig
Quoted 5 lines · Kars de Jong

Yes, I have a current patch which integrates all of the above mentioned changes. Didn't get around to testing it yet with the integrated DMA API patches.

I hope to be able to send it later this week.

Any updates? Honestly, I do not plan to touch the current 53c7xx/etc mess in the upoming request_buffer transition, and unless the m68k folks provide the new 53c700-based driver I'll just submit a patch to rip 53c7xx and users out without replacement.

Unfortunately real life got in the way. I don't have much time to work on m68k anymore.

This weekend I did a test with 2.6.18 and the new 53c700-based driver on my MVME167 which didn't work very well. It locked up several times, and the exception handler got stuck in some loop.

I did not have these problems with 2.6.16.

I will send the patch in its current form, so that the old 53c7xx driver can be removed.

Kind regards,

Kars.

#36 lore raw

RFC PATCH 1/1 m68k: switch to 53c700 driver

In reply to Christoph Hellwig
Quoted 4 lines · Christoph Hellwig

Any updates? Honestly, I do not plan to touch the current 53c7xx/etc mess in the upoming request_buffer transition, and unless the m68k folks provide the new 53c700-based driver I'll just submit a patch to rip 53c7xx and users out without replacement.

OK, here's the patch, without the m68k generic iomap changes.

If there are no objections, I will commit it to our CVS repository so Geert can send it upstream (with proper Signed-Off-By: headers and everything).

This patch is relative to the m68k CVS repository, which is at kernel version 2.6.18.

I have renamed the mvme16x.c and bvme6000.c files to mvme16x_scsi.c and bvme6000_scsi.c respectively, I'm not sure if this is a good idea though.

Kind regards,

Kars.

Index: linux-2.6-m68k-vme/drivers/scsi/53c700.c
===================================================================
RCS file: /home/linux-m68k/cvsroot/linux/drivers/scsi/53c700.c,v retrieving revision 1.1.1.37

drivers/scsi/53c700.c +10 -10
diff -u -r1.1.1.37 53c700.c
@@ -660,20 +660,20 @@
 {
 	struct NCR_700_Host_Parameters *hostdata = 
 		(struct NCR_700_Host_Parameters *)host->hostdata[0];
-	__u32 dcntl_extra = 0;
 	__u8 min_period;
 	__u8 min_xferp = (hostdata->chip710 ? NCR_710_MIN_XFERP : NCR_700_MIN_XFERP);
 
 	if(hostdata->chip710) {
 		__u8 burst_disable = hostdata->burst_disable
 			? BURST_DISABLE : 0;
-		dcntl_extra = COMPAT_700_MODE;
+		hostdata->dcntl_extra |= COMPAT_700_MODE;
 
-		NCR_700_writeb(dcntl_extra, host, DCNTL_REG);
+		NCR_700_writeb(hostdata->dcntl_extra, host, DCNTL_REG);
 		NCR_700_writeb(BURST_LENGTH_8  | hostdata->dmode_extra,
 			       host, DMODE_710_REG);
-		NCR_700_writeb(burst_disable | (hostdata->differential ? 
-						DIFF : 0), host, CTEST7_REG);
+		NCR_700_writeb(burst_disable | hostdata->ctest7_extra |
+			       (hostdata->differential ? DIFF : 0),
+			       host, CTEST7_REG);
 		NCR_700_writeb(BTB_TIMER_DISABLE, host, CTEST0_REG);
 		NCR_700_writeb(FULL_ARBITRATION | ENABLE_PARITY | PARITY
 			       | AUTO_ATN, host, SCNTL0_REG);
@@ -708,13 +708,13 @@
 		 * of spec: sync divider 2, async divider 3 */
 		DEBUG(("53c700: sync 2 async 3\n"));
 		NCR_700_writeb(SYNC_DIV_2_0, host, SBCL_REG);
-		NCR_700_writeb(ASYNC_DIV_3_0 | dcntl_extra, host, DCNTL_REG);
+		NCR_700_writeb(ASYNC_DIV_3_0 | hostdata->dcntl_extra, host, DCNTL_REG);
 		hostdata->sync_clock = hostdata->clock/2;
 	} else	if(hostdata->clock > 50  && hostdata->clock <= 75) {
 		/* sync divider 1.5, async divider 3 */
 		DEBUG(("53c700: sync 1.5 async 3\n"));
 		NCR_700_writeb(SYNC_DIV_1_5, host, SBCL_REG);
-		NCR_700_writeb(ASYNC_DIV_3_0 | dcntl_extra, host, DCNTL_REG);
+		NCR_700_writeb(ASYNC_DIV_3_0 | hostdata->dcntl_extra, host, DCNTL_REG);
 		hostdata->sync_clock = hostdata->clock*2;
 		hostdata->sync_clock /= 3;
 		
@@ -722,18 +722,18 @@
 		/* sync divider 1, async divider 2 */
 		DEBUG(("53c700: sync 1 async 2\n"));
 		NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG);
-		NCR_700_writeb(ASYNC_DIV_2_0 | dcntl_extra, host, DCNTL_REG);
+		NCR_700_writeb(ASYNC_DIV_2_0 | hostdata->dcntl_extra, host, DCNTL_REG);
 		hostdata->sync_clock = hostdata->clock;
 	} else if(hostdata->clock > 25 && hostdata->clock <=37) {
 		/* sync divider 1, async divider 1.5 */
 		DEBUG(("53c700: sync 1 async 1.5\n"));
 		NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG);
-		NCR_700_writeb(ASYNC_DIV_1_5 | dcntl_extra, host, DCNTL_REG);
+		NCR_700_writeb(ASYNC_DIV_1_5 | hostdata->dcntl_extra, host, DCNTL_REG);
 		hostdata->sync_clock = hostdata->clock;
 	} else {
 		DEBUG(("53c700: sync 1 async 1\n"));
 		NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG);
-		NCR_700_writeb(ASYNC_DIV_1_0 | dcntl_extra, host, DCNTL_REG);
+		NCR_700_writeb(ASYNC_DIV_1_0 | hostdata->dcntl_extra, host, DCNTL_REG);
 		/* sync divider 1, async divider 1 */
 		hostdata->sync_clock = hostdata->clock;
 	}

Index: linux-2.6-m68k-vme/drivers/scsi/53c700.h
===================================================================
RCS file: /home/linux-m68k/cvsroot/linux/drivers/scsi/53c700.h,v retrieving revision 1.1.1.20

drivers/scsi/53c700.h +5 -0
diff -u -r1.1.1.20 53c700.h
@@ -177,6 +177,7 @@
 	__u8	state;
 	#define NCR_700_FLAG_AUTOSENSE	0x01
 	__u8	flags;
+	__u8	pad1[2];	/* Needed for m68k where min alignment is 2 bytes */
 	int	tag;
 	__u32	resume_offset;
 	struct scsi_cmnd *cmnd;
@@ -196,6 +197,8 @@
 	void __iomem	*base;		/* the base for the port (copied to host) */
 	struct device	*dev;
 	__u32	dmode_extra;	/* adjustable bus settings */
+	__u32	dcntl_extra;	/* adjustable bus settings */
+	__u32	ctest7_extra;	/* adjustable bus settings */
 	__u32	differential:1;	/* if we are differential */
 #ifdef CONFIG_53C700_LE_ON_BE
 	/* This option is for HP only.  Set it if your chip is wired for
@@ -352,6 +355,7 @@
 #define		SEL_TIMEOUT_DISABLE	0x10 /* 710 only */
 #define         DFP                     0x08
 #define         EVP                     0x04
+#define         CTEST7_TT1              0x02
 #define		DIFF			0x01
 #define CTEST6_REG                      0x1A
 #define	TEMP_REG			0x1C
@@ -385,6 +389,7 @@
 #define		SOFTWARE_RESET		0x01
 #define		COMPAT_700_MODE		0x01
 #define 	SCRPTS_16BITS		0x20
+#define		EA_710			0x20
 #define		ASYNC_DIV_2_0		0x00
 #define		ASYNC_DIV_1_5		0x40
 #define		ASYNC_DIV_1_0		0x80

Index: linux-2.6-m68k-vme/drivers/scsi/Kconfig
===================================================================
RCS file: /home/linux-m68k/cvsroot/linux/drivers/scsi/Kconfig,v retrieving revision 1.24

drivers/scsi/Kconfig +8 -11
diff -u -r1.24 Kconfig
@@ -1053,6 +1053,11 @@
 	depends on SCSI_LASI700
 	default y
 
+config 53C700_BE_BUS
+	bool
+	depends on SCSI_AMIGA7XX || MVME16x_SCSI || BVME6000_SCSI
+	default y
+
 config SCSI_SYM53C8XX_2
 	tristate "SYM53C8XX Version 2 SCSI support"
 	depends on PCI && SCSI
@@ -1670,7 +1675,7 @@
 	  one in the near future, say Y to this question. Otherwise, say N.
 
 config SCSI_AMIGA7XX
-	bool "Amiga NCR53c710 SCSI support (EXPERIMENTAL)"
+	tristate "Amiga NCR53c710 SCSI support (EXPERIMENTAL)"
 	depends on AMIGA && SCSI && EXPERIMENTAL
 	select SCSI_SPI_ATTRS
 	help
@@ -1771,7 +1776,7 @@
 	  single-board computer.
 
 config MVME16x_SCSI
-	bool "NCR53C710 SCSI driver for MVME16x"
+	tristate "NCR53C710 SCSI driver for MVME16x"
 	depends on MVME16x && SCSI
 	select SCSI_SPI_ATTRS
 	help
@@ -1780,7 +1785,7 @@
 	  will want to say Y to this question.
 
 config BVME6000_SCSI
-	bool "NCR53C710 SCSI driver for BVME6000"
+	tristate "NCR53C710 SCSI driver for BVME6000"
 	depends on BVME6000 && SCSI
 	select SCSI_SPI_ATTRS
 	help
@@ -1788,14 +1793,6 @@
 	  SCSI controller chip.  Almost everyone using one of these boards
 	  will want to say Y to this question.
 
-config SCSI_NCR53C7xx_FAST
-	bool "allow FAST-SCSI [10MHz]"
-	depends on SCSI_AMIGA7XX || MVME16x_SCSI || BVME6000_SCSI
-	help
-	  This will enable 10MHz FAST-SCSI transfers with your host
-	  adapter. Some systems have problems with that speed, so it's safest
-	  to say N here.
-
 config SUN3_SCSI
 	tristate "Sun3 NCR5380 SCSI"
 	depends on SUN3 && SCSI

Index: linux-2.6-m68k-vme/drivers/scsi/Makefile
===================================================================
RCS file: /home/linux-m68k/cvsroot/linux/drivers/scsi/Makefile,v retrieving revision 1.1.1.46

drivers/scsi/Makefile +4 -11
diff -u -r1.1.1.46 Makefile
@@ -35,7 +35,7 @@
 
 obj-$(CONFIG_ISCSI_TCP) 	+= libiscsi.o	iscsi_tcp.o
 obj-$(CONFIG_INFINIBAND_ISER) 	+= libiscsi.o
-obj-$(CONFIG_SCSI_AMIGA7XX)	+= amiga7xx.o	53c7xx.o
+obj-$(CONFIG_SCSI_AMIGA7XX)	+= 53c700.o	amiga7xx.o
 obj-$(CONFIG_A3000_SCSI)	+= a3000.o	wd33c93.o
 obj-$(CONFIG_A2091_SCSI)	+= a2091.o	wd33c93.o
 obj-$(CONFIG_GVP11_SCSI)	+= gvp11.o	wd33c93.o
@@ -51,8 +51,8 @@
 obj-$(CONFIG_MAC_SCSI)		+= mac_scsi.o
 obj-$(CONFIG_SCSI_MAC_ESP)	+= mac_esp.o	NCR53C9x.o
 obj-$(CONFIG_SUN3_SCSI)		+= sun3_scsi.o  sun3_scsi_vme.o
-obj-$(CONFIG_MVME16x_SCSI)	+= mvme16x.o	53c7xx.o
-obj-$(CONFIG_BVME6000_SCSI)	+= bvme6000.o	53c7xx.o
+obj-$(CONFIG_MVME16x_SCSI)	+= 53c700.o	mvme16x_scsi.o
+obj-$(CONFIG_BVME6000_SCSI)	+= 53c700.o	bvme6000_scsi.o
 obj-$(CONFIG_SCSI_SIM710)	+= 53c700.o	sim710.o
 obj-$(CONFIG_SCSI_ADVANSYS)	+= advansys.o
 obj-$(CONFIG_SCSI_PSI240I)	+= psi240i.o
@@ -170,10 +170,8 @@
 oktagon_esp_mod-objs	:= oktagon_esp.o oktagon_io.o
 
 # Files generated that shall be removed upon make clean
-clean-files :=	53c7xx_d.h 53c700_d.h	\
-		53c7xx_u.h 53c700_u.h
+clean-files :=	53c700_d.h 53c700_u.h
 
-$(obj)/53c7xx.o:   $(obj)/53c7xx_d.h $(obj)/53c7xx_u.h
 $(obj)/53c700.o $(MODVERDIR)/$(obj)/53c700.ver: $(obj)/53c700_d.h
 
 # If you want to play with the firmware, uncomment
@@ -181,11 +179,6 @@
 
 ifdef GENERATE_FIRMWARE
 
-$(obj)/53c7xx_d.h: $(src)/53c7xx.scr $(src)/script_asm.pl
-	$(CPP) -traditional -DCHIP=710 - < $< | grep -v '^#' | $(PERL) -s $(src)/script_asm.pl -ncr7x0_family $@ $(@:_d.h=_u.h)
-
-$(obj)/53c7xx_u.h: $(obj)/53c7xx_d.h
-
 $(obj)/53c700_d.h: $(src)/53c700.scr $(src)/script_asm.pl
 	$(PERL) -s $(src)/script_asm.pl -ncr7x0_family $@ $(@:_d.h=_u.h) < $<
 

Index: linux-2.6-m68k-vme/drivers/scsi/amiga7xx.c
===================================================================
RCS file: /home/linux-m68k/cvsroot/linux/drivers/scsi/amiga7xx.c,v retrieving revision 1.11

drivers/scsi/amiga7xx.c +248 -104

391 lines not on this page · raw message

Index: linux-2.6-m68k-vme/drivers/scsi/bvme6000_scsi.c
===================================================================
RCS file: linux-2.6-m68k-vme/drivers/scsi/bvme6000_scsi.c

drivers/scsi/bvme6000_scsi.c new file +132 -0

132 lines not on this page · raw message

Index: linux-2.6-m68k-vme/drivers/scsi/mvme16x_scsi.c
===================================================================
RCS file: linux-2.6-m68k-vme/drivers/scsi/mvme16x_scsi.c

drivers/scsi/mvme16x_scsi.c new file +155 -0

155 lines not on this page · raw message

#37 lore raw

Re: [RFC PATCH] m68k: switch to 53c700 driver

Quoted 7 lines · Kars de Jong
Quoted 4 lines · Christoph Hellwig

Any updates? Honestly, I do not plan to touch the current 53c7xx/etc mess in the upoming request_buffer transition, and unless the m68k folks provide the new 53c700-based driver I'll just submit a patch to rip 53c7xx and users out without replacement.

OK, here's the patch, without the m68k generic iomap changes.

Ah, the missing io{read,write}*() stuff :-)

Quoted 6 lines

If there are no objections, I will commit it to our CVS repository so Geert can send it upstream (with proper Signed-Off-By: headers and everything).

This patch is relative to the m68k CVS repository, which is at kernel version 2.6.18.

You forgot this part, as zorro_module_init was removed in 2.6.17-rc1:

drivers/scsi/amiga7xx.c renamed from drivers/scsi/amiga7xx.c.orig +1 -1
@@ -273,7 +273,7 @@ static int __init amiga7xx_scsi_init(voi
 	}
 
 #ifdef CONFIG_ZORRO
-	err = zorro_module_init(&amiga7xx_driver);
+	err = zorro_register_driver(&amiga7xx_driver);
 #endif
 
 	return err;
Quoted 3 lines

I have renamed the mvme16x.c and bvme6000.c files to mvme16x_scsi.c and bvme6000_scsi.c respectively, I'm not sure if this is a good idea though.

I guess that's OK, as it makes the module name more sensible.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#38 lore raw

Re: [RFC PATCH] m68k: switch to 53c700 driver

In reply to Kars de Jong
Quoted 7 lines · Kars de Jong
Quoted 4 lines · Christoph Hellwig

Any updates? Honestly, I do not plan to touch the current 53c7xx/etc mess in the upoming request_buffer transition, and unless the m68k folks provide the new 53c700-based driver I'll just submit a patch to rip 53c7xx and users out without replacement.

OK, here's the patch, without the m68k generic iomap changes.

Could you regenerate this against the current git-head? I've tried several merge points and I still can't get it to apply ... I suspect it had additional m68k fixes in the original file.

Thanks,

James

#39 lore raw

Re: [RFC PATCH] m68k: switch to 53c700 driver

Quoted 7 lines · James Bottomley
Quoted 6 lines · Kars de Jong
Quoted 4 lines · Christoph Hellwig

Any updates? Honestly, I do not plan to touch the current 53c7xx/etc mess in the upoming request_buffer transition, and unless the m68k folks provide the new 53c700-based driver I'll just submit a patch to rip 53c7xx and users out without replacement.

Quoted 5 lines
Quoted 1 line

OK, here's the patch, without the m68k generic iomap changes.

Could you regenerate this against the current git-head? I've tried several merge points and I still can't get it to apply ... I suspect it had additional m68k fixes in the original file.

Yes, it was against the m68k tree.

If Kars doesn't respond, you can try

m68k-generic-io.diff
m68k-mvme-scsi-rename.diff
m68k-53c700-scsi.diff

from http://linux-m68k-cvs.ubb.ca/~geert/linux-m68k-2.6.x-merging/. These are against 2.6.19.

BTW, are you interested in more Scsi_Cmnd -> struct scsi_cmnd patches? I have a few of them lying around.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#40 lore raw

Re: [RFC PATCH] m68k: switch to 53c700 driver

Quoted 14 lines · Geert Uytterhoeven
Quoted 7 lines · James Bottomley
Quoted 6 lines · Kars de Jong
Quoted 4 lines · Christoph Hellwig

Any updates? Honestly, I do not plan to touch the current 53c7xx/etc mess in the upoming request_buffer transition, and unless the m68k folks provide the new 53c700-based driver I'll just submit a patch to rip 53c7xx and users out without replacement.

Quoted 5 lines
Quoted 1 line

OK, here's the patch, without the m68k generic iomap changes.

Could you regenerate this against the current git-head? I've tried several merge points and I still can't get it to apply ... I suspect it had additional m68k fixes in the original file.

Quoted 5 lines

Yes, it was against the m68k tree.

If Kars doesn't respond, you can try

m68k-generic-io.diff

Hmm... That breaks when you have ISA && !PCI (e.g. amiga or q40 defconfig):

lib/built-in.o: In function `ioread32_rep':
(.text+0xc31a): undefined reference to `insl'
lib/built-in.o: In function `iowrite32_rep':
(.text+0xc43e): undefined reference to `outsl'
lib/built-in.o: In function `ioread32':
(.text+0xc7da): undefined reference to `readl'
lib/built-in.o: In function `iowrite32':
(.text+0xca6a): undefined reference to `writel'

#41 lore raw

Re: [RFC PATCH] m68k: switch to 53c700 driver

Quoted 4 lines · Al Viro
Quoted 1 line

m68k-generic-io.diff

Hmm... That breaks when you have ISA && !PCI (e.g. amiga or q40 defconfig):

Quoted 8 lines

lib/built-in.o: In function `ioread32_rep':
(.text+0xc31a): undefined reference to `insl'
lib/built-in.o: In function `iowrite32_rep':
(.text+0xc43e): undefined reference to `outsl'
lib/built-in.o: In function `ioread32':
(.text+0xc7da): undefined reference to `readl'
lib/built-in.o: In function `iowrite32':
(.text+0xca6a): undefined reference to `writel'

Thanks for spotting that. I'll update the patch.

Kars.

#42 lore raw

Re: [RFC PATCH] m68k: switch to 53c700 driver

Quoted 14 lines · Kars de Jong
Quoted 4 lines · Al Viro
Quoted 1 line

m68k-generic-io.diff

Hmm... That breaks when you have ISA && !PCI (e.g. amiga or q40 defconfig):

Quoted 8 lines

lib/built-in.o: In function `ioread32_rep':
(.text+0xc31a): undefined reference to `insl'
lib/built-in.o: In function `iowrite32_rep':
(.text+0xc43e): undefined reference to `outsl'
lib/built-in.o: In function `ioread32':
(.text+0xc7da): undefined reference to `readl'
lib/built-in.o: In function `iowrite32':
(.text+0xca6a): undefined reference to `writel'

Quoted 1 line

Thanks for spotting that. I'll update the patch.

Where do we stand on this? IMHO we should just put the scsi driver update in now so we can kill all the old cruft and let the notoriously lagging m68k arch support catch up once they get the time for it.

#43 lore raw
In reply to Andi Kleen
Quoted 1 line · Andi Kleen

SCSI_ADVANSYS - vendor went out of market afaik. Probably not many left.

there's quite a lot left. And the driver isn't really broken, just not converted to the proper dma mapping API. It works okay on x86, but not on the more advanced hardware. I have a pending new driver for the wide scsi advansys cards but it's stuck for me to get some new wide scsi disks.

Quoted 2 lines

SCSI_CPQFCTS - suboption of another driver, incredibly ugly code defying all coding standards.

cpqfc should go. mkp is working on a proper driver for the hardware.

Quoted 2 lines

SCSI_EATA_PIO - really old ISA cards. Probably all left over cards are way over their MTBF by now.

absolutely.

Quoted 4 lines

SCSI_SEAGATE - extremly scary code, i doubt there is any such card left SCSI_MCA_53C9X - BROKEN_ON_SMP only. Ok I guess there are no SMP Micro Channel systems.
SCSI_QLOGIC_ISP - afaik there is a newer driver for this

yes, qla1280 supports the hardware. the only thing missing is support for reading settings from the nvram. someone who has a qla1020/qla1040 pci card should be able to port that over easily, but when I added support for the chips I only had sgi hardware with onboard chips available that didn't have the nvram.

Quoted 5 lines

SCSI_AMIGA7XX - no maintainer, broken forever
ATARI_SCSI - no maintainer, broken forever
MVME16x_SCSI - no maintainer, broken forever
BVME6000_SCSI - same
SUN3_SCSI - sun3 never worked in mainline anyways

yes, we should probably kill them. the 53c7xx core driver needs to die and the users ported over to the 53c700 core. sun3_scsi needs to be reimplemented using the common 5380 core instead of it's own out of date copy.

#44 lore raw
In reply to Andi Kleen
Quoted 5 lines · Andi Kleen

In 2.6.14rc3:

linux/drivers/scsi> grep -c BROKEN Kconfig
11

Quoted 7 lines

There are a lot of SCSI drivers who have been marked BROKEN forever. Or at least for all of 2.6 and one would expect if there are users left they would have fixed them by now. Would it make sense to remove them?

In particular:

SCSI_ADVANSYS - vendor went out of market afaik. Probably not many left.

Andi,
My advansys controllers work fine in lk 2.6 . Advansys itself (or its SCSI HBA line) was onsold several times. I'm not sure if they are still available (the last ones for sale that I noticed were for SCSI (SPI-based) scanners). When lk 2.5 development changes broke the drivers, patches came in from several contributors to fix them (usually the minimum required). I believe they are still out there, probably in decreasing numbers (e.g. I decommissioned a server using one last week). It's nice (albeit aging) hardware whose reliability exceeds that of a few other HBA manufacturers' products I could name.

So whoever marked the advansys driver as broken was making some political statement IMO. If it ain't broken, it shouldn't be marked as BROKEN.

If the kernel source was split up at some stage (rather than one big source tarball), it may be appropriate to put the advansys driver in with the second tier (looking for a better term than "legacy") drivers.

Doug Gilbert

author
#45 lore raw
Quoted 4 lines · Douglas Gilbert

So whoever marked the advansys driver as broken
was making some political statement IMO. If it
ain't broken, it shouldn't be marked as BROKEN.

Well if it's not broken it should be marked unbroken.

If it only works on x86 as hch stated one way would be to make it dependent on (X86 && !X86_64)

-Andi