firewire.c (168051) | firewire.c (169117) |
---|---|
1/*- 2 * Copyright (c) 2003 Hidetoshi Shimokawa 3 * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 17 unchanged lines hidden (view full) --- 26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 * POSSIBILITY OF SUCH DAMAGE. 33 * | 1/*- 2 * Copyright (c) 2003 Hidetoshi Shimokawa 3 * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 17 unchanged lines hidden (view full) --- 26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 * POSSIBILITY OF SUCH DAMAGE. 33 * |
34 * $FreeBSD: head/sys/dev/firewire/firewire.c 168051 2007-03-30 15:43:56Z simokawa $ | 34 * $FreeBSD: head/sys/dev/firewire/firewire.c 169117 2007-04-30 10:50:53Z simokawa $ |
35 * 36 */ 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/types.h> 41 42#include <sys/kernel.h> --- 371 unchanged lines hidden (view full) --- 414 415 /* Locate our children */ 416 bus_generic_probe(dev); 417 418 /* launch attachement of the added children */ 419 bus_generic_attach(dev); 420 421 /* bus_reset */ | 35 * 36 */ 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/types.h> 41 42#include <sys/kernel.h> --- 371 unchanged lines hidden (view full) --- 414 415 /* Locate our children */ 416 bus_generic_probe(dev); 417 418 /* launch attachement of the added children */ 419 bus_generic_attach(dev); 420 421 /* bus_reset */ |
422 fw_busreset(fc, FWBUSNOTREADY); |
|
422 fc->ibr(fc); 423 424 return 0; 425} 426 427/* 428 * Attach it as child. 429 */ --- 209 unchanged lines hidden (view full) --- 639#endif 640 crom_add_simple_text(src, root, &buf->hw, hostname); 641} 642 643/* 644 * Called after bus reset. 645 */ 646void | 423 fc->ibr(fc); 424 425 return 0; 426} 427 428/* 429 * Attach it as child. 430 */ --- 209 unchanged lines hidden (view full) --- 640#endif 641 crom_add_simple_text(src, root, &buf->hw, hostname); 642} 643 644/* 645 * Called after bus reset. 646 */ 647void |
647fw_busreset(struct firewire_comm *fc) | 648fw_busreset(struct firewire_comm *fc, uint32_t new_status) |
648{ 649 struct firewire_dev_comm *fdc; 650 struct crom_src *src; 651 device_t *devlistp; 652 void *newrom; 653 int i, devcnt; 654 655 switch(fc->status){ 656 case FWBUSMGRELECT: 657 callout_stop(&fc->bmr_callout); 658 break; 659 default: 660 break; 661 } | 649{ 650 struct firewire_dev_comm *fdc; 651 struct crom_src *src; 652 device_t *devlistp; 653 void *newrom; 654 int i, devcnt; 655 656 switch(fc->status){ 657 case FWBUSMGRELECT: 658 callout_stop(&fc->bmr_callout); 659 break; 660 default: 661 break; 662 } |
662 fc->status = FWBUSRESET; | 663 fc->status = new_status; |
663 fw_reset_csr(fc); 664 fw_reset_crom(fc); 665 666 if (device_get_children(fc->bdev, &devlistp, &devcnt) == 0) { 667 for( i = 0 ; i < devcnt ; i++) 668 if (device_get_state(devlistp[i]) >= DS_ATTACHED) { 669 fdc = device_get_softc(devlistp[i]); 670 if (fdc->post_busreset != NULL) --- 1589 unchanged lines hidden --- | 664 fw_reset_csr(fc); 665 fw_reset_crom(fc); 666 667 if (device_get_children(fc->bdev, &devlistp, &devcnt) == 0) { 668 for( i = 0 ; i < devcnt ; i++) 669 if (device_get_state(devlistp[i]) >= DS_ATTACHED) { 670 fdc = device_get_softc(devlistp[i]); 671 if (fdc->post_busreset != NULL) --- 1589 unchanged lines hidden --- |