summaryrefslogtreecommitdiffstats
path: root/sys/dev/firewire/firewire.c
Commit message (Collapse)AuthorAgeFilesLines
* Use device_identify and bus_add_child methods to add a firewiresimokawa2004-01-301-4/+13
| | | | | bus on fwohci. This should fix attach failure caused by a race between firewire and fwochi initialization for the kernel module.
* * firewiresimokawa2004-01-081-17/+26
| | | | | | | | | | Add tcode_str[] and improve debug message. * sbp If max_speed is negative, use the maximum speed which the ohci chip supports. The default max_speed is -1. * if_fwe If tx_speed is negative, use the maximum speed which the ohci chip supports. The default tx_speed is 2.
* Remove __P().simokawa2004-01-061-19/+19
|
* MFp4:simokawa2004-01-051-23/+7
| | | | | | | | | | | * firewire - Remove pending list. - Ignore timeout for the FWXF_START state. - Define M_FWMEM for debugging. - Comment out DELAY() in fw_asybusy(). - Improve debugging messages * sbp - Freeze simq while bus reset.
* - Implement selwakeuppri() which allows raising the priority of atanimura2003-11-091-1/+1
| | | | | | | | | | | | | thread being waken up. The thread waken up can run at a priority as high as after tsleep(). - Replace selwakeup()s with selwakeuppri()s and pass appropriate priorities. - Add cv_broadcastpri() which raises the priority of the broadcast threads. Used by selwakeuppri() if collision occurs. Not objected in: -arch, -current
* Move validity check of 'xfer->fc != NULL' to right place.simokawa2003-10-251-4/+4
|
* Don't check timeout just after booted.simokawa2003-10-241-3/+15
| | | | | Some transactions could be considered wrongly to be timeout bacause interrupts are disabled during boot process.
* - Introduce hw.firewire.hold_count sysctl MIB by popular demand.simokawa2003-10-061-18/+24
| | | | | | | This MIB specifies how many bus resets should be observed before the lost device entry is removed. The default value is 3. You can set this value to 0 if you want a SBP device to be detached from CAM layer as soon as the device is physically detached like USB.
* MFp4: Change struct fw_xfer to reduce memory copy in fwmem_*() functions.simokawa2003-10-021-210/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And many changes. * all - Major change of struct fw_xfer. o {send,recv}.buf is splitted into hdr and payload. o Remove unnecessary fields. o spd is moved under send and recv. - Remove unnecessary 'volatile' keyword. - Add definition of rtcode and extcode. * firewire.c - Ignore FWDEVINVAL devices in fw_noderesolve_nodeid(). - Check the existance of the bind before call STAILQ_REMOVE(). - Fix bug in the fw_bindadd(). - Change element of struct fw_bind for simplicity. - Check rtcode of response packet. - Reduce split transaction timeout to 200 msec. (100msec is the default value in the spec.) - Set watchdog timer cycle to 10 Hz. - Set xfer->tv just before calling fw_get_tlabel(). * fwohci.c - Simplifies fwohci_get_plen(). * sbp.c - Fix byte order of multibyte scsi_status informations. - Split sbp.c and sbp.h. - Unit number is not necessary for FIFO¤ address. - Reduce LOGIN_DELAY and SCAN_DELAY to 1 sec. - Add some constants defineded in SBP-2 spec. * fwmem.c - Introduce fwmem_strategy() and reduce memory copy.
* Comment out verbose debug messages.simokawa2003-08-221-0/+2
|
* Change device name notation.simokawa2003-08-051-42/+41
| | | | | | - /dev/fw{,mem}X.Y represents the Y'th unit on the X'th bus. - /dev/fw{,mem}X is an alias of fw{,mem}X.0 for compatibility. - Clone devices.
* Clean up include files.simokawa2003-07-181-3/+0
|
* Add some debug messages.simokawa2003-07-181-4/+6
|
* Configuraiton ROM fix:simokawa2003-07-091-8/+26
| | | | | | - Don't bump the generation if ROM has not changed and keep it between 0x2 and 0xf. - Refetch the ROM if CRC of the businfo block has changed.
* Include file clean up.simokawa2003-06-301-2/+3
|
* Fix several problems related to resume:simokawa2003-06-281-2/+16
| | | | | | | | - Initialize fc->status to process bus reset correctly after resume. - Initialize AT ring buffer pointer. - Requeue stdma to stfree for active IR buffer. - Stop DMA before suspend for safe. - Set powerstate after resume.
* - Enable support for building Configuration ROM.simokawa2003-06-151-16/+100
| | | | - Improve probe message for S800 chips.
* Allocate zeroed space for fwdev.simokawa2003-06-031-1/+2
|
* - Use moderate gap counts listed in IEEE1394a.simokawa2003-05-111-28/+32
| | | | | | | | - Simplify and correct the bus manager election process. - Check link_active when choosing cycle master. - Fix location of the cmr bit. Approved by: re (scottl)
* Don't panic for FWXF_START state in fw_xfer_unload().simokawa2003-05-051-2/+7
|
* Set status to FWDEVINVAL if probe failed.simokawa2003-04-301-6/+7
|
* - Improve configuration ROM parser for multiple unit directory.simokawa2003-04-261-83/+4
| | | | | | | | - Remove getcsrdata(). - Don't print device type, this can be obtained by fwcontrol. Tested with: Maxtor 5000XT Tested by: Daniel O'Connor <doconnor@gsoft.com.au>
* Fix printf warning for RELENG_4.simokawa2003-04-241-0/+4
|
* MFp4(simokawa_firewire):simokawa2003-04-171-235/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many internal structure changes for the FireWire driver. - Compute CRC in CROM parsing. - Add support for configuration ROM build. - Simplify dummy buffer handling. - busdma conversion - Use swi_taskqueue_giant for -current. Mark the interrupt routine as MPSAFE. - AR buffer handling. Don't reallocate AR buffer but just recycle it. Don't malloc and copy per packet in fwohci_arcv(). Pass packet to fw_rcv() using iovec. Application must prepare receiving buffer in advance. - Change fw_bind API so that application should pre-allocate xfer structure. - Add fw_xfer_unload() for recycling struct fw_xfer. - Add post_busreset hook - Remove unused 'sub' and 'act_type' in struct fw_xfer. - Remove npacket from struct fw_bulkxfer. - Don't call back handlers in fwochi_arcv() if the packet has not drained in AT queue - Make firewire works on big endian platform. - Use native endian for packet header and remove unnecessary ntohX/htonX. - Remove FWXFERQ_PACKET mode. We don't use it anymore. - Remove unnecessary restriction of FWSTMAXCHUNK. - Don't set root node for phy config packet if the root node is not cycle master capable but set myself for root node. We should be the root node after next bus reset. Spotted by: Yoshihiro Tabira <tabira@scd.mei.co.jp> - Improve self id handling Tested on: i386, sparc64 and i386 with forced bounce buffer
* - The payload of Write Request Quad must be network byte order.simokawa2003-03-241-1/+1
|
* MFp4(simokawa_sbp)simokawa2003-03-061-0/+1
| | | | | | | | | | Improve if_fwe performance. - Simplify mbuf handling by using bulkxfer. Now, it uses mbuf clusters for RX buffer as usual ethernet drivers. - Recycle struct xfer buffer and don't call malloc at runtime. - Count input and output errors. - Handle a mbuf chain longer than 6 correctly. - Increase queue length.
* MFp4(simokawa_sbp branch)simokawa2003-02-271-8/+4
| | | | | | | | | | | | | | | | | | | Improve SBP device probeing: - Wait 2 sec before issuing LOGIN ORB expecting the reconnection hold timer expires. - Serialize management ORB and scanning LUN by CAM on each target. This should fix the problem for devices which have multiple LUNs. Test device is donated by: Jaye Mathisen <mrcpu@internetcds.com> - Freeze SIM queue for 2 sec after BUS RESET. - Retry with LOGIN rather than RECONNECT after LOGIN is not completed for BUS RESET. - Use appropriate CAM status for BUS RESET and DEVICE RESET. - Let CAM to scan targets after BUS REST. - Implement CAM scan target function. - Keep our own devq freeze count. - Let CAM to know that SBP does tagged queuing. These should be merged to RELENG_4 before 4.8-RELEASE.
* Fix fwdev memory leak on detaching.simokawa2003-02-181-5/+13
|
* * firewire.csimokawa2003-02-181-0/+6
| | | | | | | | | - 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.
* * firewire.csimokawa2003-02-171-2/+6
| | | | | | | | | | | | | - Don't initiate bus reset even if probe failed for some nodes to prevent infinite bus reset loop. Problem Reported by: Pierre Beyssac <pb@fasterix.frmug.org> - Protect timeout routine with splfw() for 4-stable. * sbp.c - Make sure to release devq when start request.
* - Increase split transaction timeout from 2 sec to 6 sec.simokawa2003-02-151-3/+3
| | | | | | Problem reported by: Michael Reifenberger <root@nihil.reifenberger.com> - Improve debug message.
* firewire/fwohcisimokawa2003-02-131-8/+13
| | | | | | | | | | | | | - 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.
* Add new ioctl to specify target EUI64 for fwmem.simokawa2003-02-091-2/+2
|
* - Detect split transcation timeout.simokawa2003-02-091-48/+114
| | | | | | | | * 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.
* Add missing 'static'.simokawa2003-02-031-2/+2
|
* - Take malloc type as an argument in fw_xfer_alloc().simokawa2003-02-031-11/+13
| | | | | | | | | - 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().
* Define new malloc type M_FW and use it.simokawa2003-02-011-25/+27
|
* - replace timeout with callout_*.simokawa2003-02-011-31/+34
| | | | | - replace TAILQ with STAILQ for device list. - some clean up.
* Sort device list by eui64 in acendent order correctly.simokawa2003-02-011-12/+12
|
* Restart cycle master after bus manager election.simokawa2003-01-301-21/+68
| | | | | | | This should fix the IR(and maybe IT) problem when the host becames the bus manager. - rename fw_noderesolve() to fw_noderesolve_eui64() and add fw_noderesolve_nodeid().
* - Fix build on alpha.simokawa2003-01-291-3/+2
| | | | - Add a missing newline in printf.
* - Improve IT/IR DMA queue management.simokawa2003-01-261-178/+0
| | | | | - Improve debug message for mbuf handling. - Wait 1 sec for DMA stop in fwohci_i{t,r}x_disable() before freeing buffers.
* Remove FW_SSTDV ioctl. It is not used anymore.simokawa2003-01-241-4/+10
|
* - Add sysctl knob for bus manager. (hw.firewire.try_bmr)simokawa2003-01-231-14/+13
| | | | | - Check invalid SID length. - Add some debug messages.
* Replace M_DONTWAIT with M_NOWAIT for malloc().simokawa2003-01-171-12/+12
| | | | Pointed out by: nate@root.org
* Fix bus manager election process.simokawa2003-01-171-16/+18
| | | | | - Lock response 0x3f means that the host becomes the bus manager. - Add missing htonl().
* Improve memory allocation.simokawa2003-01-161-4/+4
| | | | | | - Don't use contigmalloc() and allocate page by page to avoid allocation failure. - allocate buffer by PAGE_SIZE.
* Add DV_PAL for PAL users.simokawa2003-01-151-5/+5
|
* Fix IT DMA underun while bus reset.simokawa2003-01-151-0/+2
| | | | - Reduce number of DELAY's
* Fix for FreeBSD-4.simokawa2003-01-141-15/+4
| | | | - Protect whole fw_tbuf_update() with splfw().
OpenPOWER on IntegriCloud