Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/firewire/fwohci.c
Show First 20 Lines • Show All 2,690 Lines • ▼ Show 20 Lines | |||||
fwohci_get_plen(struct fwohci_softc *sc, struct fwohci_dbch *dbch, struct fw_pkt *fp) | fwohci_get_plen(struct fwohci_softc *sc, struct fwohci_dbch *dbch, struct fw_pkt *fp) | ||||
{ | { | ||||
struct tcode_info *info; | struct tcode_info *info; | ||||
int r; | int r; | ||||
info = &tinfo[fp->mode.common.tcode]; | info = &tinfo[fp->mode.common.tcode]; | ||||
r = info->hdr_len + sizeof(uint32_t); | r = info->hdr_len + sizeof(uint32_t); | ||||
if ((info->flag & FWTI_BLOCK_ASY) != 0) | if ((info->flag & FWTI_BLOCK_ASY) != 0) | ||||
r += roundup2(fp->mode.wreqb.len, sizeof(uint32_t)); | r += roundup2((uint32_t)fp->mode.wreqb.len, sizeof(uint32_t)); | ||||
if (r == sizeof(uint32_t)) { | if (r == sizeof(uint32_t)) { | ||||
/* XXX */ | /* XXX */ | ||||
device_printf(sc->fc.dev, "Unknown tcode %d\n", | device_printf(sc->fc.dev, "Unknown tcode %d\n", | ||||
fp->mode.common.tcode); | fp->mode.common.tcode); | ||||
return (-1); | return (-1); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 273 Lines • Show Last 20 Lines |