opnsense-src/sys/powerpc/ps3
Chattrapat Sangmanee 813f244b27 ps3disk.c: Rewrite ps3disk_transfer
This function is bugged since the beginning, but it never hit because
its variable doesn't allow.  However, since commit
a77e1f0f81 it happen now.

First, it assume that ds_len will always equal to real user requested
size.  So it being used for sector count calculation.  This is no longer
true, and will fail if attempt to read last few sectors.  Use
bp->bio_length instead.

Second, this being a loop is pointless because nsegs will never be > 1
as specified at bus_dma_tag_create() call.  And all it doing is to
repeat very same command again but with different ds_addr.  Since
bio_driver2 tag ident pointer are being reused, the result will be
discarded at ps3disk_intr().

Signed-off-by: Chattrapat Sangmanee <aomsin27@hotmail.co.th>
Reviewed by: imp,mav
Pull Request: https://github.com/freebsd/freebsd-src/pull/1414
2025-01-24 12:40:34 -07:00
..
ehci_ps3.c newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANY 2024-07-24 22:22:58 -06:00
if_glc.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_glcreg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mmu_ps3.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
ohci_ps3.c newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANY 2024-07-24 22:22:58 -06:00
platform_ps3.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
ps3-hv-asm.awk ps3: add elfv2 support 2024-09-13 23:13:05 -04:00
ps3-hv-header.awk sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
ps3-hvcall.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ps3-hvcall.master sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ps3-hvcall.S ps3: add elfv2 support 2024-09-13 23:13:05 -04:00
ps3_syscons.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
ps3bus.c Replace calls to bus_generic_attach with bus_attach_children 2024-12-06 17:26:16 -05:00
ps3bus.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ps3cdrom.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
ps3disk.c ps3disk.c: Rewrite ps3disk_transfer 2025-01-24 12:40:34 -07:00
ps3pic.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00