* [patch] 2.4: Revert interface removal
@ 2002-08-05 9:05 Maciej W. Rozycki
2002-08-05 10:41 ` Ralf Baechle
0 siblings, 1 reply; 9+ messages in thread
From: Maciej W. Rozycki @ 2002-08-05 9:05 UTC (permalink / raw)
To: Ralf Baechle, linux-mips
Hello,
A recent change to include/asm-mips/scatterlist.h broke
drivers/scsi/dec_esp.c. Since 2.4.19 is not the proper version to remove
interfaces, I'm going to check in the following patch to the 2.4 branch to
revert the change (with a slightly sanitized type for the dvma_address
member).
Any objections?
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
patch-mips-2.4.19-rc1-20020802-sg-2
diff -up --recursive --new-file linux-mips-2.4.19-rc1-20020802.macro/include/asm-mips/scatterlist.h linux-mips-2.4.19-rc1-20020802/include/asm-mips/scatterlist.h
--- linux-mips-2.4.19-rc1-20020802.macro/include/asm-mips/scatterlist.h 2002-08-01 15:57:53.000000000 +0000
+++ linux-mips-2.4.19-rc1-20020802/include/asm-mips/scatterlist.h 2002-08-03 20:43:35.000000000 +0000
@@ -10,6 +10,13 @@ struct scatterlist {
unsigned int length;
};
+struct mmu_sglist {
+ char *addr;
+ char *__dont_touch;
+ unsigned int len;
+ dma_addr_t dvma_address;
+};
+
#define ISA_DMA_THRESHOLD (0x00ffffff)
#endif /* __ASM_SCATTERLIST_H */
diff -up --recursive --new-file linux-mips-2.4.19-rc1-20020802.macro/include/asm-mips64/scatterlist.h linux-mips-2.4.19-rc1-20020802/include/asm-mips64/scatterlist.h
--- linux-mips-2.4.19-rc1-20020802.macro/include/asm-mips64/scatterlist.h 2002-08-01 15:57:54.000000000 +0000
+++ linux-mips-2.4.19-rc1-20020802/include/asm-mips64/scatterlist.h 2002-08-03 20:43:44.000000000 +0000
@@ -10,6 +10,13 @@ struct scatterlist {
unsigned long length;
};
+struct mmu_sglist {
+ char *addr;
+ char *__dont_touch;
+ unsigned long len;
+ dma_addr_t dvma_address;
+};
+
#define ISA_DMA_THRESHOLD (0x00ffffff)
#endif /* __ASM_SCATTERLIST_H */
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [patch] 2.4: Revert interface removal 2002-08-05 9:05 [patch] 2.4: Revert interface removal Maciej W. Rozycki @ 2002-08-05 10:41 ` Ralf Baechle 2002-08-05 11:05 ` Carsten Langgaard 2002-08-05 11:20 ` Maciej W. Rozycki 0 siblings, 2 replies; 9+ messages in thread From: Ralf Baechle @ 2002-08-05 10:41 UTC (permalink / raw) To: Maciej W. Rozycki; +Cc: linux-mips On Mon, Aug 05, 2002 at 11:05:40AM +0200, Maciej W. Rozycki wrote: > A recent change to include/asm-mips/scatterlist.h broke > drivers/scsi/dec_esp.c. Since 2.4.19 is not the proper version to remove > interfaces, I'm going to check in the following patch to the 2.4 branch to > revert the change (with a slightly sanitized type for the dvma_address > member). > > Any objections? Sorry for simply removing the structure, that was an accident. The question why the use of struct mmu_sglist still hasn't been replaced by newer interfaces stays ... So please go ahead and commit your patch. Ralf ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch] 2.4: Revert interface removal 2002-08-05 10:41 ` Ralf Baechle @ 2002-08-05 11:05 ` Carsten Langgaard 2002-08-05 11:53 ` Carsten Langgaard 2002-08-05 11:20 ` Maciej W. Rozycki 1 sibling, 1 reply; 9+ messages in thread From: Carsten Langgaard @ 2002-08-05 11:05 UTC (permalink / raw) To: Ralf Baechle; +Cc: Maciej W. Rozycki, linux-mips Changing the scatterlist and the pci functions seems to break things in the IDE interface. /Carsten Ralf Baechle wrote: > On Mon, Aug 05, 2002 at 11:05:40AM +0200, Maciej W. Rozycki wrote: > > > A recent change to include/asm-mips/scatterlist.h broke > > drivers/scsi/dec_esp.c. Since 2.4.19 is not the proper version to remove > > interfaces, I'm going to check in the following patch to the 2.4 branch to > > revert the change (with a slightly sanitized type for the dvma_address > > member). > > > > Any objections? > > Sorry for simply removing the structure, that was an accident. The > question why the use of struct mmu_sglist still hasn't been replaced by > newer interfaces stays ... > > So please go ahead and commit your patch. > > Ralf -- _ _ ____ ___ Carsten Langgaard Mailto:carstenl@mips.com |\ /|||___)(___ MIPS Denmark Direct: +45 4486 5527 | \/ ||| ____) Lautrupvang 4B Switch: +45 4486 5555 TECHNOLOGIES 2750 Ballerup Fax...: +45 4486 5556 Denmark http://www.mips.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch] 2.4: Revert interface removal 2002-08-05 11:05 ` Carsten Langgaard @ 2002-08-05 11:53 ` Carsten Langgaard 2002-08-05 13:04 ` Carsten Langgaard 0 siblings, 1 reply; 9+ messages in thread From: Carsten Langgaard @ 2002-08-05 11:53 UTC (permalink / raw) To: Ralf Baechle, Maciej W. Rozycki, linux-mips Ralf, could we please revert the latest changes to include/asm-mips/scatterlist.h and include/asm-mips/pci.h /Carsten Carsten Langgaard wrote: > Changing the scatterlist and the pci functions seems to break things in the IDE > interface. > > /Carsten > > Ralf Baechle wrote: > > > On Mon, Aug 05, 2002 at 11:05:40AM +0200, Maciej W. Rozycki wrote: > > > > > A recent change to include/asm-mips/scatterlist.h broke > > > drivers/scsi/dec_esp.c. Since 2.4.19 is not the proper version to remove > > > interfaces, I'm going to check in the following patch to the 2.4 branch to > > > revert the change (with a slightly sanitized type for the dvma_address > > > member). > > > > > > Any objections? > > > > Sorry for simply removing the structure, that was an accident. The > > question why the use of struct mmu_sglist still hasn't been replaced by > > newer interfaces stays ... > > > > So please go ahead and commit your patch. > > > > Ralf > > -- > _ _ ____ ___ Carsten Langgaard Mailto:carstenl@mips.com > |\ /|||___)(___ MIPS Denmark Direct: +45 4486 5527 > | \/ ||| ____) Lautrupvang 4B Switch: +45 4486 5555 > TECHNOLOGIES 2750 Ballerup Fax...: +45 4486 5556 > Denmark http://www.mips.com -- _ _ ____ ___ Carsten Langgaard Mailto:carstenl@mips.com |\ /|||___)(___ MIPS Denmark Direct: +45 4486 5527 | \/ ||| ____) Lautrupvang 4B Switch: +45 4486 5555 TECHNOLOGIES 2750 Ballerup Fax...: +45 4486 5556 Denmark http://www.mips.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch] 2.4: Revert interface removal 2002-08-05 11:53 ` Carsten Langgaard @ 2002-08-05 13:04 ` Carsten Langgaard 2002-08-05 14:47 ` Ralf Baechle 0 siblings, 1 reply; 9+ messages in thread From: Carsten Langgaard @ 2002-08-05 13:04 UTC (permalink / raw) To: Ralf Baechle, Maciej W. Rozycki, linux-mips [-- Attachment #1: Type: text/plain, Size: 2110 bytes --] Ok, I finally figured out what the problem is. The attached patch fix the problems, please apply. /Carsten Carsten Langgaard wrote: > Ralf, could we please revert the latest changes to include/asm-mips/scatterlist.h > and include/asm-mips/pci.h > > /Carsten > > Carsten Langgaard wrote: > > > Changing the scatterlist and the pci functions seems to break things in the IDE > > interface. > > > > /Carsten > > > > Ralf Baechle wrote: > > > > > On Mon, Aug 05, 2002 at 11:05:40AM +0200, Maciej W. Rozycki wrote: > > > > > > > A recent change to include/asm-mips/scatterlist.h broke > > > > drivers/scsi/dec_esp.c. Since 2.4.19 is not the proper version to remove > > > > interfaces, I'm going to check in the following patch to the 2.4 branch to > > > > revert the change (with a slightly sanitized type for the dvma_address > > > > member). > > > > > > > > Any objections? > > > > > > Sorry for simply removing the structure, that was an accident. The > > > question why the use of struct mmu_sglist still hasn't been replaced by > > > newer interfaces stays ... > > > > > > So please go ahead and commit your patch. > > > > > > Ralf > > > > -- > > _ _ ____ ___ Carsten Langgaard Mailto:carstenl@mips.com > > |\ /|||___)(___ MIPS Denmark Direct: +45 4486 5527 > > | \/ ||| ____) Lautrupvang 4B Switch: +45 4486 5555 > > TECHNOLOGIES 2750 Ballerup Fax...: +45 4486 5556 > > Denmark http://www.mips.com > > -- > _ _ ____ ___ Carsten Langgaard Mailto:carstenl@mips.com > |\ /|||___)(___ MIPS Denmark Direct: +45 4486 5527 > | \/ ||| ____) Lautrupvang 4B Switch: +45 4486 5555 > TECHNOLOGIES 2750 Ballerup Fax...: +45 4486 5556 > Denmark http://www.mips.com -- _ _ ____ ___ Carsten Langgaard Mailto:carstenl@mips.com |\ /|||___)(___ MIPS Denmark Direct: +45 4486 5527 | \/ ||| ____) Lautrupvang 4B Switch: +45 4486 5555 TECHNOLOGIES 2750 Ballerup Fax...: +45 4486 5556 Denmark http://www.mips.com [-- Attachment #2: pci.3.patch --] [-- Type: text/plain, Size: 2183 bytes --] Index: arch/mips/kernel/pci-dma.c =================================================================== RCS file: /cvs/linux/arch/mips/kernel/pci-dma.c,v retrieving revision 1.7.2.1 diff -u -r1.7.2.1 pci-dma.c --- arch/mips/kernel/pci-dma.c 2002/08/01 12:40:14 1.7.2.1 +++ arch/mips/kernel/pci-dma.c 2002/08/05 12:54:19 @@ -30,11 +30,11 @@ if (ret != NULL) { memset(ret, 0, size); + *dma_handle = virt_to_bus(ret); #ifdef CONFIG_NONCOHERENT_IO dma_cache_wback_inv((unsigned long) ret, size); ret = UNCAC_ADDR(ret); #endif - *dma_handle = virt_to_bus(ret); } return ret; Index: include/asm-mips/page.h =================================================================== RCS file: /cvs/linux/include/asm-mips/page.h,v retrieving revision 1.14.2.9 diff -u -r1.14.2.9 page.h --- include/asm-mips/page.h 2002/08/01 12:40:14 1.14.2.9 +++ include/asm-mips/page.h 2002/08/05 12:54:32 @@ -125,8 +125,8 @@ #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -#define UNCAC_ADDR(addr) ((addr) - (PAGE_OFFSET + UNCAC_BASE)) -#define CAC_ADDR(addr) ((addr) - (UNCAC_BASE + PAGE_OFFSET)) +#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE) +#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET) /* * Memory above this physical address will be considered highmem. Index: include/asm-mips/pci.h =================================================================== RCS file: /cvs/linux/include/asm-mips/pci.h,v retrieving revision 1.24.2.7 diff -u -r1.24.2.7 pci.h --- include/asm-mips/pci.h 2002/08/01 12:40:14 1.24.2.7 +++ include/asm-mips/pci.h 2002/08/05 12:54:32 @@ -180,7 +180,7 @@ else if (!sg->address && !sg->page) out_of_line_bug(); - if (sg[i].address) { + if (sg->address) { dma_cache_wback_inv((unsigned long)sg->address, sg->length); sg->dma_address = virt_to_bus(sg->address); @@ -317,7 +317,7 @@ * returns, or alternatively stop on the first sg_dma_len(sg) which * is 0. */ -#define sg_dma_address(sg) ((sg)->address) +#define sg_dma_address(sg) ((sg)->dma_address) #define sg_dma_len(sg) ((sg)->length) #endif /* __KERNEL__ */ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch] 2.4: Revert interface removal 2002-08-05 13:04 ` Carsten Langgaard @ 2002-08-05 14:47 ` Ralf Baechle 2002-08-06 6:46 ` Carsten Langgaard 0 siblings, 1 reply; 9+ messages in thread From: Ralf Baechle @ 2002-08-05 14:47 UTC (permalink / raw) To: Carsten Langgaard; +Cc: Maciej W. Rozycki, linux-mips On Mon, Aug 05, 2002 at 03:04:13PM +0200, Carsten Langgaard wrote: > Ok, I finally figured out what the problem is. > The attached patch fix the problems, please apply. Applied, along with the 64-bit and 2.5 bits your patch was missing. Ralf ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch] 2.4: Revert interface removal 2002-08-05 14:47 ` Ralf Baechle @ 2002-08-06 6:46 ` Carsten Langgaard 2002-08-06 9:05 ` Carsten Langgaard 0 siblings, 1 reply; 9+ messages in thread From: Carsten Langgaard @ 2002-08-06 6:46 UTC (permalink / raw) To: Ralf Baechle; +Cc: Maciej W. Rozycki, linux-mips [-- Attachment #1: Type: text/plain, Size: 793 bytes --] Ralf Baechle wrote: > On Mon, Aug 05, 2002 at 03:04:13PM +0200, Carsten Langgaard wrote: > > > Ok, I finally figured out what the problem is. > > The attached patch fix the problems, please apply. > > Applied, along with the 64-bit and 2.5 bits your patch was missing. > I was waiting for you to fix the bus_to_baddr in the 64-bit, I can see you have have done something about it now, but I'm afraid you didn't get it quite right. Here is a patch to fix the typos. /Carsten -- _ _ ____ ___ Carsten Langgaard Mailto:carstenl@mips.com |\ /|||___)(___ MIPS Denmark Direct: +45 4486 5527 | \/ ||| ____) Lautrupvang 4B Switch: +45 4486 5555 TECHNOLOGIES 2750 Ballerup Fax...: +45 4486 5556 Denmark http://www.mips.com [-- Attachment #2: pci.h.patch --] [-- Type: text/plain, Size: 900 bytes --] Index: include/asm-mips64/pci.h =================================================================== RCS file: /cvs/linux/include/asm-mips64/pci.h,v retrieving revision 1.16.2.9 diff -u -r1.16.2.9 pci.h --- include/asm-mips64/pci.h 2002/08/06 02:21:50 1.16.2.9 +++ include/asm-mips64/pci.h 2002/08/06 06:36:35 @@ -213,8 +213,8 @@ out_of_line_bug(); dma_cache_wback_inv((unsigned long)sg->address, sg->length); - sg->address = bus_to_baddr(hwdev->bus->number) | - virt_to_bus(sg->address); + sg->address = bus_to_baddr(hwdev->bus->number, + virt_to_bus(sg->address)); } return nents; @@ -251,7 +251,7 @@ if (direction == PCI_DMA_NONE) out_of_line_bug(); - dma_cache_wback_inv((unsigned long)__va(dma_handle - bus_to_baddr(hwdev->bus->number)), size); + dma_cache_wback_inv((unsigned long)__va(bus_to_baddr(hwdev->bus->number, dma_handle)), size); } /* ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch] 2.4: Revert interface removal 2002-08-06 6:46 ` Carsten Langgaard @ 2002-08-06 9:05 ` Carsten Langgaard 0 siblings, 0 replies; 9+ messages in thread From: Carsten Langgaard @ 2002-08-06 9:05 UTC (permalink / raw) To: Ralf Baechle, Maciej W. Rozycki, linux-mips [-- Attachment #1: Type: text/plain, Size: 2535 bytes --] Carsten Langgaard wrote: > Ralf Baechle wrote: > > > On Mon, Aug 05, 2002 at 03:04:13PM +0200, Carsten Langgaard wrote: > > > > > Ok, I finally figured out what the problem is. > > > The attached patch fix the problems, please apply. > > > > Applied, along with the 64-bit and 2.5 bits your patch was missing. > > > Another reason why I didn't send the patch against the 64-bit is that the pci handling is not completely identical. So the patch should actually look like this for things to work. > > I was waiting for you to fix the bus_to_baddr in the 64-bit, I can see > you have have done something about it now, but I'm afraid you didn't get > it quite right. > Here is a patch to fix the typos. > > /Carsten > > -- > _ _ ____ ___ Carsten Langgaard Mailto:carstenl@mips.com > |\ /|||___)(___ MIPS Denmark Direct: +45 4486 5527 > | \/ ||| ____) Lautrupvang 4B Switch: +45 4486 5555 > TECHNOLOGIES 2750 Ballerup Fax...: +45 4486 5556 > Denmark http://www.mips.com > > ------------------------------------------------------------------------ > Index: include/asm-mips64/pci.h > =================================================================== > RCS file: /cvs/linux/include/asm-mips64/pci.h,v > retrieving revision 1.16.2.9 > diff -u -r1.16.2.9 pci.h > --- include/asm-mips64/pci.h 2002/08/06 02:21:50 1.16.2.9 > +++ include/asm-mips64/pci.h 2002/08/06 06:36:35 > @@ -213,8 +213,8 @@ > out_of_line_bug(); > > dma_cache_wback_inv((unsigned long)sg->address, sg->length); > - sg->address = bus_to_baddr(hwdev->bus->number) | > - virt_to_bus(sg->address); > + sg->address = bus_to_baddr(hwdev->bus->number, > + virt_to_bus(sg->address)); > } > > return nents; > @@ -251,7 +251,7 @@ > if (direction == PCI_DMA_NONE) > out_of_line_bug(); > > - dma_cache_wback_inv((unsigned long)__va(dma_handle - bus_to_baddr(hwdev->bus->number)), size); > + dma_cache_wback_inv((unsigned long)__va(bus_to_baddr(hwdev->bus->number, dma_handle)), size); > } > > /* -- _ _ ____ ___ Carsten Langgaard Mailto:carstenl@mips.com |\ /|||___)(___ MIPS Denmark Direct: +45 4486 5527 | \/ ||| ____) Lautrupvang 4B Switch: +45 4486 5555 TECHNOLOGIES 2750 Ballerup Fax...: +45 4486 5556 Denmark http://www.mips.com [-- Attachment #2: pci.h.patch --] [-- Type: text/plain, Size: 1163 bytes --] Index: include/asm-mips64/pci.h =================================================================== RCS file: /cvs/linux/include/asm-mips64/pci.h,v retrieving revision 1.16.2.9 diff -u -r1.16.2.9 pci.h --- include/asm-mips64/pci.h 2002/08/06 02:21:50 1.16.2.9 +++ include/asm-mips64/pci.h 2002/08/06 09:01:25 @@ -213,8 +213,8 @@ out_of_line_bug(); dma_cache_wback_inv((unsigned long)sg->address, sg->length); - sg->address = bus_to_baddr(hwdev->bus->number) | - virt_to_bus(sg->address); + sg->address = bus_to_baddr(hwdev->bus->number, + virt_to_bus(sg->address)); } return nents; @@ -251,7 +251,7 @@ if (direction == PCI_DMA_NONE) out_of_line_bug(); - dma_cache_wback_inv((unsigned long)__va(dma_handle - bus_to_baddr(hwdev->bus->number)), size); + dma_cache_wback_inv((unsigned long)__va(bus_to_baddr(hwdev->bus->number, dma_handle)), size); } /* @@ -341,7 +341,7 @@ * returns, or alternatively stop on the first sg_dma_len(sg) which * is 0. */ -#define sg_dma_address(sg) ((sg)->dma_address) +#define sg_dma_address(sg) ((sg)->address) #define sg_dma_len(sg) ((sg)->length) #endif /* __KERNEL__ */ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch] 2.4: Revert interface removal 2002-08-05 10:41 ` Ralf Baechle 2002-08-05 11:05 ` Carsten Langgaard @ 2002-08-05 11:20 ` Maciej W. Rozycki 1 sibling, 0 replies; 9+ messages in thread From: Maciej W. Rozycki @ 2002-08-05 11:20 UTC (permalink / raw) To: Ralf Baechle; +Cc: linux-mips On Mon, 5 Aug 2002, Ralf Baechle wrote: > Sorry for simply removing the structure, that was an accident. The > question why the use of struct mmu_sglist still hasn't been replaced by > newer interfaces stays ... Because the structure wasn't removed at the 2.3 time? M68k still keeps it as well and their sun3x_esp.c driver uses it (I think dec_esp.c was derived from that one). For 2.5, I'll work on adding an appropriate DMA addressing layer for the TURBOchannel bus and the I/O ASIC and fixing the driver, of course. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2002-08-06 9:05 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-08-05 9:05 [patch] 2.4: Revert interface removal Maciej W. Rozycki 2002-08-05 10:41 ` Ralf Baechle 2002-08-05 11:05 ` Carsten Langgaard 2002-08-05 11:53 ` Carsten Langgaard 2002-08-05 13:04 ` Carsten Langgaard 2002-08-05 14:47 ` Ralf Baechle 2002-08-06 6:46 ` Carsten Langgaard 2002-08-06 9:05 ` Carsten Langgaard 2002-08-05 11:20 ` Maciej W. Rozycki
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.