Commit graph

41 commits

Author SHA1 Message Date
Hidetoshi Shimokawa 1adf684228 * firewire.c
- Fix memory leak in detaching.
- Initialize fc->status to other than FWBUSREST.

* fwohci.c
- Ignore BUS reset events while BUS reset phase. We can't clear that flag
	during bus reset phase.
2003-02-18 09:39:48 +00:00
Hidetoshi Shimokawa 627d85fbdd firewire/fwohci
- Drain fwohci TX queue first then drain xfer queue which has not started.
- Check validity of the received packet length.
- Don't allocate too large buffer for xfer receive buf.

sbp
- Fix panic for some CROM which doesn't have a text leaf.
	This could fix the PR kern/48129 but no feedback has been gotten from
	the originator yet.
- Put back some M_NOWAIT flags into malloc which could be called
	in interrupt context for 4-stable.
2003-02-13 13:35:57 +00:00
Hidetoshi Shimokawa 645394e60b Increase atrq.ndesc for if_fwe. 2003-02-09 17:11:55 +00:00
Hidetoshi Shimokawa 864d7e72b8 - Detect split transcation timeout.
* implement watchdog timer.
	* check all standing transactions in firewire_xfer_timeout().
- Add firewire_xferq_drain() for fw_busreset().
- Add/improve some debug messages.
- Call fw_xfer_done() if retry handler is NULL.
2003-02-09 07:16:01 +00:00
Hidetoshi Shimokawa 6f99c2ff52 Remove debug message. 2003-02-07 09:46:30 +00:00
Hidetoshi Shimokawa beb19fc5dd Remove unnecessary M_NOWAIT. 2003-02-03 09:41:42 +00:00
Hidetoshi Shimokawa 48249fe0c8 - Take malloc type as an argument in fw_xfer_alloc().
- Fix overwrite problem of freed buffers. It was rare but could happen
	when fwohci_arcv() is called before fwohci_txd() is called for
	the transcation.
- Drain AT queues and pend AR queues on SID receive rather than BUS reset to
	make sure DMA actually stops.
- Do agent reset in sbp_timeout().
2003-02-03 07:33:31 +00:00
Hidetoshi Shimokawa 5166f1df39 Define new malloc type M_FW and use it. 2003-02-01 15:04:33 +00:00
Hidetoshi Shimokawa 0981f5f00e - replace timeout with callout_*.
- replace TAILQ with STAILQ for device list.
- some clean up.
2003-02-01 14:42:49 +00:00
Hidetoshi Shimokawa 64cf5240a9 SBP related changes.
- Issue LOGOUT command on detach and shutdown.
- Rename some functions.
2003-01-31 14:11:22 +00:00
Hidetoshi Shimokawa 7054e8482e - Probe number of IT/IR DMA contexts as specified in OHCI spec. 2003-01-29 15:32:35 +00:00
Hidetoshi Shimokawa 878db8920f - Fix build on alpha.
- Add a missing newline in printf.
2003-01-29 02:13:31 +00:00
Hidetoshi Shimokawa 53f1eb8620 - Split db.desc.cmd into desc.control and desc.reqcount.
- remove unncessary descriptor updates.
2003-01-26 18:38:06 +00:00
Hidetoshi Shimokawa 5a7ba74dc4 - Improve IT/IR DMA queue management.
- Improve debug message for mbuf handling.
- Wait 1 sec for DMA stop in fwohci_i{t,r}x_disable() before freeing buffers.
2003-01-26 15:39:04 +00:00
Hidetoshi Shimokawa c547b896f5 Change API of FW_GDEVLST ioctl.
- include information about itself.
- define struct fw_devinfo and use it in struct fw_devlstreq.
- unify EUI64 representation using struct fw_eui64.
2003-01-25 14:47:33 +00:00
Hidetoshi Shimokawa 9190691bd0 Remove FW_SSTDV ioctl. It is not used anymore. 2003-01-24 13:03:19 +00:00
Hidetoshi Shimokawa 16e0f48443 - Add sysctl knob for bus manager. (hw.firewire.try_bmr)
- Check invalid SID length.
- Add some debug messages.
2003-01-23 13:34:40 +00:00
Hidetoshi Shimokawa b9b35d1965 Ignore events of unused IR DMA. 2003-01-21 16:24:35 +00:00
Hidetoshi Shimokawa ae8c82bbe9 Replace M_DONTWAIT with M_NOWAIT for malloc().
Pointed out by: nate@root.org
2003-01-17 15:15:21 +00:00
Hidetoshi Shimokawa 0ef6095d41 Improve some debug massages. 2003-01-17 15:03:57 +00:00
Hidetoshi Shimokawa 7643dc189d Detect underrun of IT queue for debugging.
Add some comments.
2003-01-17 03:52:48 +00:00
Hidetoshi Shimokawa e2ad5d6e8c Improve memory allocation.
- Don't use contigmalloc() and allocate page by page to avoid
	allocation failure.
- allocate buffer by PAGE_SIZE.
2003-01-16 13:09:33 +00:00
Hidetoshi Shimokawa 97ae6c1f15 Use cycleMatch for precise IT DMA start timing. 2003-01-16 07:01:54 +00:00
Hidetoshi Shimokawa 4ed65ce9e1 Fix IT DMA underun while bus reset.
- Reduce number of DELAY's
2003-01-15 04:21:16 +00:00
Hidetoshi Shimokawa 0aaa9a23cd Minimal fix for DV part.
- Don't panic on contigmalloc failure.
- Calculate timestamp by feedforward rather than feedback which depends on
	unreliable interrupt timing.
- Overwrite timestamp in CIP header correctly.
- Add debug code for timestamp synchronization.
- Add comments.
2003-01-13 16:08:09 +00:00
Hidetoshi Shimokawa 435dd29b27 - Add error messages for bulkxfer.
- Reduce register access.
2003-01-09 10:25:07 +00:00
Hidetoshi Shimokawa a423957600 Reduce diff to RELENG_4. 2003-01-05 14:58:45 +00:00
Hidetoshi Shimokawa 94b6f028fd - Change definition of fc->maxrec same as fwdev->maxrec.
- 'spec' and 'ver' are attributes of a unit rather than a node.
- Report Phy and Link info separatelly.
- Reorder intialization step in fwohci_reset().
2003-01-05 06:21:30 +00:00
Hidetoshi Shimokawa d6105b602c - Replace printf() with device_printf().
- Separate fc->dev (i.e. fwohci0) and fc->bdev (i.e. firewire0).
- Remove unused firewirebusreg.h.
- Reduce size of descriptor block for asynchronous transmit and
	check the number of descriptor when copying from mbuf.
- Skip mbuf whose length is zero. NFS seems passing such mbuf and
	some chips generates unrecoverable error.
2003-01-04 10:21:11 +00:00
Hidetoshi Shimokawa 9339321d89 - Propagate suspend/resume to child devices.
- Restore pci config registers after resume.
- Reinitialize and start rx buffers after resume.
- Don't reallocate memory in fwohci_db_init() if the dbch is
	already initialized.
- Fix typo.
- Some clean up.
2003-01-04 06:40:57 +00:00
Hidetoshi Shimokawa d0fd7bc6b5 Experimental support for suspend/resume, not finished yet. 2003-01-01 08:25:32 +00:00
Hidetoshi Shimokawa 1f2361f8f8 - Retry phy access when the wait-loop count is exhausted.
- Free allocated memory when detaching.
- Detect contigmalloc failure.
2003-01-01 04:23:54 +00:00
Hidetoshi Shimokawa e4b13179f6 Improve error checking of phy access and retry when error occurs. 2002-12-31 10:00:36 +00:00
Hidetoshi Shimokawa ac9f66922b firewire.c
- Fix permission of device node.

fwochi.c, fwohcireg.h
- Detect phy access failure correct way.
- Set root hold-off bit before initiating bus reset.
	This should fix the problem with VIA6306.

fwohcivar.h
- Fix over-allocation of array. (fwohcivar.h)

sbp.c
- Return CAM_DEV_NOT_THERE rather than CAM_TID_INVALID to prevent retry.
2002-12-26 03:17:59 +00:00
Hidetoshi Shimokawa 17c3d42c9e Reduce and improve debug messages.
Approved by: re
2002-12-06 02:17:30 +00:00
Hidetoshi Shimokawa 8da326fd37 - clean up 2002-11-12 10:02:50 +00:00
Hidetoshi Shimokawa c572b81055 - Remove unused code.
- Style fixes.
2002-11-12 05:52:01 +00:00
Hidetoshi Shimokawa 783058fa0d Restrict process count in fwohci_arcv() and fwohci_ircv(). 2002-11-12 04:54:30 +00:00
Hidetoshi Shimokawa 70ce30b573 - Fix printf warnings on 64bit plathome.
- Disable fw_vmaccess() because it's not used and unuseful 64bit plathome.
2002-11-07 02:13:40 +00:00
Hidetoshi Shimokawa 851c3ad031 Sony CXD3222 OHCI i.LINK chips needs more DELAY before starting SCLK
when no devices are connected.
2002-11-05 02:42:28 +00:00
Katsushi Kobayashi 3c60ba66c4 Initial import for IEEE1394 OHCI chipdet device driver and SBP-2 (Serial
Bus Protocol 2:SCSI over IEEE1394) support for CAM.
2002-09-13 12:31:56 +00:00