msb               381 arch/alpha/include/asm/core_apecs.h 			unsigned long msb = addr & 0xf8000000;	\
msb               382 arch/alpha/include/asm/core_apecs.h 			addr -= msb;				\
msb               383 arch/alpha/include/asm/core_apecs.h 			set_hae(msb);				\
msb               226 arch/alpha/include/asm/core_lca.h 			unsigned long msb = addr & 0xf8000000;	\
msb               227 arch/alpha/include/asm/core_lca.h 			addr -= msb;				\
msb               228 arch/alpha/include/asm/core_lca.h 			set_hae(msb);				\
msb               441 arch/alpha/include/asm/core_t2.h 	unsigned long msb = addr >> 27; \
msb               443 arch/alpha/include/asm/core_t2.h 	set_hae(msb); \
msb               239 arch/m68k/bvme6000/config.c     unsigned char msr, msb;
msb               253 arch/m68k/bvme6000/config.c 	msb = rtc->t1msb;		/* Read timer1 */
msb               254 arch/m68k/bvme6000/config.c 	v = (msb << 8) | rtc->t1lsb;	/* Read timer1 */
msb               263 arch/m68k/bvme6000/config.c     if (msb > 0 && t1int)
msb                78 arch/m68k/hp300/time.c 	unsigned char lsb, msb, msb_new;
msb                83 arch/m68k/hp300/time.c 	msb = in_8(CLOCKBASE + CLKMSB1);
msb                85 arch/m68k/hp300/time.c 	if ((in_8(CLOCKBASE + CLKSR) & CLKSR_INT1) && msb > 0)
msb                89 arch/m68k/hp300/time.c 	if (msb_new != msb) {
msb                90 arch/m68k/hp300/time.c 		msb = msb_new;
msb                94 arch/m68k/hp300/time.c 	ticks = INTVAL - ((msb << 8) | lsb);
msb                35 arch/mips/sgi-ip22/ip22-time.c 	u8 msb;
msb                50 arch/mips/sgi-ip22/ip22-time.c 		msb = readb(&sgint->tcnt2);
msb                52 arch/mips/sgi-ip22/ip22-time.c 	} while (msb);
msb                87 arch/mips/sni/time.c 	volatile u8 msb;
msb               101 arch/mips/sni/time.c 		msb = inb(0x40);
msb               103 arch/mips/sni/time.c 	} while (msb);
msb               363 arch/powerpc/include/asm/kvm_ppc.h static inline u32 kvmppc_get_field(u64 inst, int msb, int lsb)
msb               368 arch/powerpc/include/asm/kvm_ppc.h 	BUG_ON(msb > lsb);
msb               370 arch/powerpc/include/asm/kvm_ppc.h 	mask = (1 << (lsb - msb + 1)) - 1;
msb               379 arch/powerpc/include/asm/kvm_ppc.h static inline u32 kvmppc_set_field(u64 inst, int msb, int lsb, int value)
msb               384 arch/powerpc/include/asm/kvm_ppc.h 	BUG_ON(msb > lsb);
msb               386 arch/powerpc/include/asm/kvm_ppc.h 	mask = ((1 << (lsb - msb + 1)) - 1) << (63 - lsb);
msb               339 arch/powerpc/kvm/book3s_paired_singles.c static inline u32 inst_get_field(u32 inst, int msb, int lsb)
msb               341 arch/powerpc/kvm/book3s_paired_singles.c 	return kvmppc_get_field(inst, msb + 32, lsb + 32);
msb                76 arch/s390/include/asm/eadm.h 	struct msb msb[AOB_NR_MSB];
msb               250 arch/x86/platform/ts5500/ts5500.c 	u8 lsb, msb;
msb               266 arch/x86/platform/ts5500/ts5500.c 	msb = inb(TS5500_ADC_CONV_MSB_ADDR);
msb               268 arch/x86/platform/ts5500/ts5500.c 	return (msb << 8) | lsb;
msb               588 block/sed-opal.c 	int msb;
msb               595 block/sed-opal.c 	msb = fls64(number);
msb               596 block/sed-opal.c 	len = DIV_ROUND_UP(msb, 8);
msb               556 crypto/tgr192.c 	u32 t, msb, lsb;
msb               560 crypto/tgr192.c 	msb = 0;
msb               563 crypto/tgr192.c 		msb++;
msb               565 crypto/tgr192.c 	msb += t >> 26;
msb               568 crypto/tgr192.c 		msb++;
msb               572 crypto/tgr192.c 		msb++;
msb               574 crypto/tgr192.c 	msb += t >> 29;
msb               592 crypto/tgr192.c 	le32p[1] = cpu_to_le32(msb);
msb              1061 drivers/acpi/arm64/iort.c 	int ret, msb;
msb              1088 drivers/acpi/arm64/iort.c 		msb = fls64(dmaaddr + size - 1);
msb              1095 drivers/acpi/arm64/iort.c 		mask = msb == 64 ? U64_MAX : (1ULL << msb) - 1;
msb              1211 drivers/base/regmap/regmap.c 	rm_field->mask = GENMASK(reg_field.msb, reg_field.lsb);
msb               196 drivers/dma/xilinx/xilinx_dma.c 	((dma_addr_t)((u64)addr##_##msb << 32 | (addr)))
msb              1587 drivers/edac/amd64_edac.c 	u32 msb, weight, num_zero_bits;
msb              1622 drivers/edac/amd64_edac.c 	msb = fls(addr_mask_orig) - 1;
msb              1624 drivers/edac/amd64_edac.c 	num_zero_bits = msb - weight;
msb              1627 drivers/edac/amd64_edac.c 	addr_mask_deinterleaved = GENMASK_ULL(msb - num_zero_bits, 1);
msb              1917 drivers/gpu/drm/i915/i915_drv.h 	const unsigned int msb = BITS_PER_TYPE(info->platform_mask[0]) - 1;
msb              1925 drivers/gpu/drm/i915/i915_drv.h 	return ((mask << (msb - pb)) & (mask << (msb - s))) & BIT(msb);
msb               107 drivers/hwmon/asc7621.c 	u8 msb[3];
msb               169 drivers/hwmon/asc7621.c 	return sprintf(buf, "%u\n", data->reg[param->msb[0]]);
msb               184 drivers/hwmon/asc7621.c 	data->reg[param->msb[0]] = reqval;
msb               185 drivers/hwmon/asc7621.c 	write_byte(client, param->msb[0], reqval);
msb               199 drivers/hwmon/asc7621.c 		       (data->reg[param->msb[0]] >> param->
msb               219 drivers/hwmon/asc7621.c 	currval = read_byte(client, param->msb[0]);
msb               221 drivers/hwmon/asc7621.c 	data->reg[param->msb[0]] = reqval;
msb               222 drivers/hwmon/asc7621.c 	write_byte(client, param->msb[0], reqval);
msb               240 drivers/hwmon/asc7621.c 	regval = (data->reg[param->msb[0]] << 8) | data->reg[param->lsb[0]];
msb               267 drivers/hwmon/asc7621.c 	data->reg[param->msb[0]] = (reqval >> 8) & 0xff;
msb               269 drivers/hwmon/asc7621.c 	write_byte(client, param->msb[0], data->reg[param->msb[0]]);
msb               302 drivers/hwmon/asc7621.c 	regval = (data->reg[param->msb[0]] << 8) | (data->reg[param->lsb[0]]);
msb               319 drivers/hwmon/asc7621.c 		       ((data->reg[param->msb[0]] *
msb               340 drivers/hwmon/asc7621.c 	data->reg[param->msb[0]] = reqval;
msb               341 drivers/hwmon/asc7621.c 	write_byte(client, param->msb[0], reqval);
msb               352 drivers/hwmon/asc7621.c 	return sprintf(buf, "%d\n", ((s8) data->reg[param->msb[0]]) * 1000);
msb               371 drivers/hwmon/asc7621.c 	data->reg[param->msb[0]] = temp;
msb               372 drivers/hwmon/asc7621.c 	write_byte(client, param->msb[0], temp);
msb               388 drivers/hwmon/asc7621.c 	u8 msb, lsb;
msb               392 drivers/hwmon/asc7621.c 	msb = data->reg[param->msb[0]];
msb               394 drivers/hwmon/asc7621.c 	temp = (((s8) msb) * 1000) + (lsb * 250);
msb               405 drivers/hwmon/asc7621.c 	u8 regval = data->reg[param->msb[0]];
msb               429 drivers/hwmon/asc7621.c 	data->reg[param->msb[0]] = temp;
msb               430 drivers/hwmon/asc7621.c 	write_byte(client, param->msb[0], temp);
msb               455 drivers/hwmon/asc7621.c 	auto_point1 = ((s8) data->reg[param->msb[1]]) * 1000;
msb               457 drivers/hwmon/asc7621.c 	    ((data->reg[param->msb[0]] >> param->shift[0]) & param->mask[0]);
msb               478 drivers/hwmon/asc7621.c 	auto_point1 = data->reg[param->msb[1]] * 1000;
msb               489 drivers/hwmon/asc7621.c 	currval = read_byte(client, param->msb[0]);
msb               491 drivers/hwmon/asc7621.c 	data->reg[param->msb[0]] = newval;
msb               492 drivers/hwmon/asc7621.c 	write_byte(client, param->msb[0], newval);
msb               508 drivers/hwmon/asc7621.c 	config = (data->reg[param->msb[0]] >> param->shift[0]) & param->mask[0];
msb               509 drivers/hwmon/asc7621.c 	altbit = (data->reg[param->msb[1]] >> param->shift[1]) & param->mask[1];
msb               547 drivers/hwmon/asc7621.c 	currval = read_byte(client, param->msb[0]);
msb               550 drivers/hwmon/asc7621.c 	data->reg[param->msb[0]] = newval;
msb               551 drivers/hwmon/asc7621.c 	write_byte(client, param->msb[0], newval);
msb               563 drivers/hwmon/asc7621.c 	config = (data->reg[param->msb[0]] >> param->shift[0]) & param->mask[0];
msb               564 drivers/hwmon/asc7621.c 	altbit = (data->reg[param->msb[1]] >> param->shift[1]) & param->mask[1];
msb               565 drivers/hwmon/asc7621.c 	minoff = (data->reg[param->msb[2]] >> param->shift[2]) & param->mask[2];
msb               623 drivers/hwmon/asc7621.c 	currval = read_byte(client, param->msb[0]);
msb               626 drivers/hwmon/asc7621.c 	data->reg[param->msb[0]] = newval;
msb               627 drivers/hwmon/asc7621.c 	write_byte(client, param->msb[0], newval);
msb               630 drivers/hwmon/asc7621.c 		currval = read_byte(client, param->msb[2]);
msb               633 drivers/hwmon/asc7621.c 		data->reg[param->msb[2]] = newval;
msb               634 drivers/hwmon/asc7621.c 		write_byte(client, param->msb[2], newval);
msb               650 drivers/hwmon/asc7621.c 	    (data->reg[param->msb[0]] >> param->shift[0]) & param->mask[0];
msb               681 drivers/hwmon/asc7621.c 	currval = read_byte(client, param->msb[0]);
msb               683 drivers/hwmon/asc7621.c 	data->reg[param->msb[0]] = newval;
msb               684 drivers/hwmon/asc7621.c 	write_byte(client, param->msb[0], newval);
msb               698 drivers/hwmon/asc7621.c 	    (data->reg[param->msb[0]] >> param->shift[0]) & param->mask[0];
msb               730 drivers/hwmon/asc7621.c 	currval = read_byte(client, param->msb[0]);
msb               732 drivers/hwmon/asc7621.c 	data->reg[param->msb[0]] = newval;
msb               733 drivers/hwmon/asc7621.c 	write_byte(client, param->msb[0], newval);
msb               747 drivers/hwmon/asc7621.c 	    (data->reg[param->msb[0]] >> param->shift[0]) & param->mask[0];
msb               778 drivers/hwmon/asc7621.c 	currval = read_byte(client, param->msb[0]);
msb               780 drivers/hwmon/asc7621.c 	data->reg[param->msb[0]] = newval;
msb               781 drivers/hwmon/asc7621.c 	write_byte(client, param->msb[0], newval);
msb               801 drivers/hwmon/asc7621.c 	  .priority = pri, .msb[0] = rm, .lsb[0] = rl, .mask[0] = m, \
msb               806 drivers/hwmon/asc7621.c 	  .priority = pri, .msb[0] = rm, .lsb[0] = rl, .mask[0] = m, \
msb               815 drivers/hwmon/asc7621.c 	  .priority = pri, .msb = rm, .lsb = rl, .mask = m, .shift = s,}
msb              1213 drivers/hwmon/asc7621.c 		for (j = 0; j < ARRAY_SIZE(asc7621_params[i].msb); j++)
msb              1214 drivers/hwmon/asc7621.c 			asc7621_register_priorities[asc7621_params[i].msb[j]] =
msb               192 drivers/hwmon/da9052-hwmon.c 	int msb, lsb, err;
msb               203 drivers/hwmon/da9052-hwmon.c 		msb = regs[0] << DA9052_TSILSB_TSIXL_BITS;
msb               209 drivers/hwmon/da9052-hwmon.c 		msb = regs[1] << DA9052_TSILSB_TSIYL_BITS;
msb               217 drivers/hwmon/da9052-hwmon.c 	return msb | lsb;
msb                63 drivers/hwmon/emc6w201.c 	int lsb, msb;
msb                66 drivers/hwmon/emc6w201.c 	msb = i2c_smbus_read_byte_data(client, reg + 1);
msb                67 drivers/hwmon/emc6w201.c 	if (unlikely(lsb < 0 || msb < 0)) {
msb                73 drivers/hwmon/emc6w201.c 	return (msb << 8) | lsb;
msb               205 drivers/hwmon/sch56xx-common.c 	int lsb, msb;
msb               212 drivers/hwmon/sch56xx-common.c 	msb = sch56xx_read_virtual_reg(addr, reg + 1);
msb               213 drivers/hwmon/sch56xx-common.c 	if (msb < 0)
msb               214 drivers/hwmon/sch56xx-common.c 		return msb;
msb               216 drivers/hwmon/sch56xx-common.c 	return lsb | (msb << 8);
msb               223 drivers/hwmon/sch56xx-common.c 	int msb, lsn;
msb               226 drivers/hwmon/sch56xx-common.c 	msb = sch56xx_read_virtual_reg(addr, msb_reg);
msb               227 drivers/hwmon/sch56xx-common.c 	if (msb < 0)
msb               228 drivers/hwmon/sch56xx-common.c 		return msb;
msb               235 drivers/hwmon/sch56xx-common.c 		return (msb << 4) | (lsn >> 4);
msb               237 drivers/hwmon/sch56xx-common.c 		return (msb << 4) | (lsn & 0x0f);
msb               119 drivers/hwspinlock/qcom_hwspinlock.c 		field.msb = 31;
msb                37 drivers/hwtracing/coresight/coresight-priv.h #define BMVAL(val, lsb, msb)	((val & GENMASK(msb, lsb)) >> lsb)
msb                51 drivers/iio/adc/lp8788_adc.c 	unsigned int msb;
msb                83 drivers/iio/adc/lp8788_adc.c 	msb = (rawdata[0] << 4) & 0x00000ff0;
msb                85 drivers/iio/adc/lp8788_adc.c 	result = msb | lsb;
msb               445 drivers/iio/adc/qcom-pm8xxx-xoadc.c 	u8 lsb, msb;
msb               552 drivers/iio/adc/qcom-pm8xxx-xoadc.c 	msb = val;
msb               553 drivers/iio/adc/qcom-pm8xxx-xoadc.c 	*adc_code = (msb << 8) | lsb;
msb                58 drivers/iio/adc/spear_adc.c 	u32 msb;
msb               118 drivers/iio/adc/spear_adc.c 		return __raw_readl(&st->adc_base_spear6xx->average.msb) &
msb               149 drivers/iio/common/ms_sensors/ms_sensors_i2c.c 	u32 msb = 0x800000;
msb               154 drivers/iio/common/ms_sensors/ms_sensors_i2c.c 	while (msb != 0x80) {
msb               155 drivers/iio/common/ms_sensors/ms_sensors_i2c.c 		if (result & msb)
msb               158 drivers/iio/common/ms_sensors/ms_sensors_i2c.c 		msb >>= 1;
msb               162 drivers/iio/light/isl29018.c 	unsigned int msb;
msb               181 drivers/iio/light/isl29018.c 	status = regmap_read(chip->regmap, ISL29018_REG_ADD_DATA_MSB, &msb);
msb               187 drivers/iio/light/isl29018.c 	dev_vdbg(dev, "MSB 0x%x and LSB 0x%x\n", msb, lsb);
msb               189 drivers/iio/light/isl29018.c 	return (msb << 8) | lsb;
msb               239 drivers/iio/light/isl29028.c 	unsigned int msb;
msb               250 drivers/iio/light/isl29028.c 	ret = regmap_read(chip->regmap, ISL29028_REG_ALSIR_U, &msb);
msb               258 drivers/iio/light/isl29028.c 	*als_ir = ((msb & 0xF) << 8) | (lsb & 0xFF);
msb                43 drivers/iio/light/veml6070.c 	u8 msb, lsb;
msb                58 drivers/iio/light/veml6070.c 	msb = ret;
msb                70 drivers/iio/light/veml6070.c 	ret = (msb << 8) | lsb;
msb               134 drivers/iio/proximity/isl29501.c 	u8 msb;
msb               140 drivers/iio/proximity/isl29501.c 		.msb = ISL29501_DISTANCE_MSB_DATA,
msb               144 drivers/iio/proximity/isl29501.c 		.msb = ISL29501_PHASE_MSB,
msb               154 drivers/iio/proximity/isl29501.c 		.msb = ISL29501_GAIN_MSB,
msb               158 drivers/iio/proximity/isl29501.c 		.msb = ISL29501_CROSSTALK_GAIN_MSB,
msb               177 drivers/iio/proximity/isl29501.c 		.msb = ISL29501_PHASE_OFFSET_MSB,
msb               202 drivers/iio/proximity/isl29501.c 	u8 msb = 0, lsb = 0;
msb               206 drivers/iio/proximity/isl29501.c 	if (reg->msb) {
msb               207 drivers/iio/proximity/isl29501.c 		ret = i2c_smbus_read_byte_data(isl29501->client, reg->msb);
msb               210 drivers/iio/proximity/isl29501.c 		msb = ret;
msb               221 drivers/iio/proximity/isl29501.c 	*val = (msb << 8) + lsb;
msb               237 drivers/iio/proximity/isl29501.c 	if (!reg->msb && value > U8_MAX)
msb               244 drivers/iio/proximity/isl29501.c 	if (reg->msb) {
msb               246 drivers/iio/proximity/isl29501.c 						reg->msb, value >> 8);
msb                88 drivers/infiniband/hw/qib/qib_iba7322.c #define BMASK(msb, lsb) (((1 << ((msb) + 1 - (lsb))) - 1) << (lsb))
msb               171 drivers/infiniband/hw/qib/qib_iba7322.c #define MASK_ACROSS(lsb, msb) \
msb               172 drivers/infiniband/hw/qib/qib_iba7322.c 	(((1ULL << ((msb) + 1 - (lsb))) - 1) << (lsb))
msb               577 drivers/isdn/hardware/mISDN/mISDNisar.c 	u8 msb;
msb               600 drivers/isdn/hardware/mISDN/mISDNisar.c 		msb = 0;
msb               603 drivers/isdn/hardware/mISDN/mISDNisar.c 		msb = HDLC_FED;
msb               617 drivers/isdn/hardware/mISDN/mISDNisar.c 					if (msb == HDLC_FED)
msb               623 drivers/isdn/hardware/mISDN/mISDNisar.c 		msb |= HDLC_FST;
msb               638 drivers/isdn/hardware/mISDN/mISDNisar.c 			  msb, count, ptr);
msb               645 drivers/isdn/hardware/mISDN/mISDNisar.c 				  msb, count, ptr);
msb               168 drivers/leds/leds-lp3952.c 				    line.bytes.msb);
msb                65 drivers/media/dvb-core/dvb_math.c 	unsigned int msb;
msb                76 drivers/media/dvb-core/dvb_math.c 	msb = fls(value) - 1;
msb                92 drivers/media/dvb-core/dvb_math.c 	significand = value << (31 - msb);
msb               115 drivers/media/dvb-core/dvb_math.c 	return ((msb << 24) + (logtable[logentry] << 8) + interpolation);
msb               556 drivers/media/dvb-frontends/cxd2099.c 	u8 msb, lsb;
msb               567 drivers/media/dvb-frontends/cxd2099.c 	read_reg(ci, 0x0f, &msb);
msb               569 drivers/media/dvb-frontends/cxd2099.c 	len = ((u16)msb << 8) | lsb;
msb               125 drivers/media/dvb-frontends/mt352.c 	buf[0] = msb(value);
msb               151 drivers/media/dvb-frontends/mt352.c 	buf[0] = msb(value);
msb               271 drivers/media/dvb-frontends/mt352.c 	buf[1] = msb(tps);      /* TPS_GIVEN_(1|0) */
msb               148 drivers/media/dvb-frontends/rtl2832.c 	u8 msb, lsb, reading[4], len;
msb               152 drivers/media/dvb-frontends/rtl2832.c 	msb = registers[reg].msb;
msb               154 drivers/media/dvb-frontends/rtl2832.c 	len = (msb >> 3) + 1;
msb               155 drivers/media/dvb-frontends/rtl2832.c 	mask = REG_MASK(msb - lsb);
msb               178 drivers/media/dvb-frontends/rtl2832.c 	u8 msb, lsb, reading[4], writing[4], len;
msb               182 drivers/media/dvb-frontends/rtl2832.c 	msb = registers[reg].msb;
msb               184 drivers/media/dvb-frontends/rtl2832.c 	len = (msb >> 3) + 1;
msb               185 drivers/media/dvb-frontends/rtl2832.c 	mask = REG_MASK(msb - lsb);
msb                39 drivers/media/dvb-frontends/rtl2832_priv.h 	u8 msb;
msb              1125 drivers/media/dvb-frontends/stb0899_drv.c 	u8  lsb, msb;
msb              1134 drivers/media/dvb-frontends/stb0899_drv.c 			msb = stb0899_read_reg(state, STB0899_ECNT1M);
msb              1135 drivers/media/dvb-frontends/stb0899_drv.c 			*ber = MAKEWORD16(msb, lsb);
msb              1149 drivers/media/dvb-frontends/stb0899_drv.c 			msb = stb0899_read_reg(state, STB0899_ECNT1M);
msb              1150 drivers/media/dvb-frontends/stb0899_drv.c 			*ber = MAKEWORD16(msb, lsb);
msb               326 drivers/media/dvb-frontends/stv0900_core.c 	u32 lsb, msb, hsb, err_val;
msb               332 drivers/media/dvb-frontends/stv0900_core.c 		msb = stv0900_get_bits(intp, ERR_CNT11);
msb               337 drivers/media/dvb-frontends/stv0900_core.c 		msb = stv0900_get_bits(intp, ERR_CNT21);
msb               342 drivers/media/dvb-frontends/stv0900_core.c 	err_val = (hsb << 16) + (msb << 8) + (lsb);
msb               212 drivers/media/dvb-frontends/zl10353.c 	zl10353_single_write(fe, TRL_NOMINAL_RATE_1, msb(nominal_rate));
msb               217 drivers/media/dvb-frontends/zl10353.c 	zl10353_single_write(fe, INPUT_FREQ_1, msb(input_freq));
msb               325 drivers/media/dvb-frontends/zl10353.c 	zl10353_single_write(fe, TPS_GIVEN_1, msb(tps));
msb               529 drivers/media/i2c/adv748x/adv748x-core.c 	int msb, lsb;
msb               532 drivers/media/i2c/adv748x/adv748x-core.c 	msb = io_read(state, ADV748X_IO_CHIP_REV_ID_2);
msb               534 drivers/media/i2c/adv748x/adv748x-core.c 	if (lsb < 0 || msb < 0) {
msb               540 drivers/media/i2c/adv748x/adv748x-core.c 		 state->client->addr << 1, lsb, msb);
msb               310 drivers/media/i2c/max2175.c static inline u8 max2175_get_bitval(u8 val, u8 msb, u8 lsb)
msb               312 drivers/media/i2c/max2175.c 	return (val & GENMASK(msb, lsb)) >> lsb;
msb               342 drivers/media/i2c/max2175.c static u8 max2175_read_bits(struct max2175 *ctx, u8 idx, u8 msb, u8 lsb)
msb               349 drivers/media/i2c/max2175.c 	return max2175_get_bitval(val, msb, lsb);
msb               353 drivers/media/i2c/max2175.c 			     u8 msb, u8 lsb, u8 newval)
msb               355 drivers/media/i2c/max2175.c 	int ret = regmap_update_bits(ctx->regmap, idx, GENMASK(msb, lsb),
msb               370 drivers/media/i2c/max2175.c static int max2175_poll_timeout(struct max2175 *ctx, u8 idx, u8 msb, u8 lsb,
msb               376 drivers/media/i2c/max2175.c 			(max2175_get_bitval(val, msb, lsb) == exp_bitval),
msb               108 drivers/media/platform/vivid/vivid-radio-rx.c 				rds.msb = prandom_u32_max(256);
msb                54 drivers/media/platform/vivid/vivid-rds-gen.c 		data[0].msb = rds->picode >> 8;
msb                57 drivers/media/platform/vivid/vivid-rds-gen.c 		data[1].msb = (rds->pty >> 3) | (rds->tp << 2);
msb                68 drivers/media/platform/vivid/vivid-rds-gen.c 			data[1].msb |= 1 << 3;
msb                70 drivers/media/platform/vivid/vivid-rds-gen.c 			data[2].msb = rds->picode >> 8;
msb                73 drivers/media/platform/vivid/vivid-rds-gen.c 			data[3].msb = rds->psname[2 * idx];
msb                79 drivers/media/platform/vivid/vivid-rds-gen.c 			data[1].msb |= 4 << 3;
msb                80 drivers/media/platform/vivid/vivid-rds-gen.c 			data[2].msb = rds->radiotext[4 * idx];
msb                83 drivers/media/platform/vivid/vivid-rds-gen.c 			data[3].msb = rds->radiotext[4 * idx + 2];
msb               104 drivers/media/platform/vivid/vivid-rds-gen.c 			data[1].msb |= 8 << 3;
msb               107 drivers/media/platform/vivid/vivid-rds-gen.c 			data[2].msb = (date >> 7) & 0xff;
msb               110 drivers/media/platform/vivid/vivid-rds-gen.c 			data[3].msb = (time >> 8) & 0xff;
msb               115 drivers/media/platform/vivid/vivid-rds-gen.c 			data[1].msb |= 0x1f << 3;
msb               117 drivers/media/platform/vivid/vivid-rds-gen.c 			data[2].msb = rds->picode >> 8;
msb               122 drivers/media/platform/vivid/vivid-rds-gen.c 			data[3].msb |= rds->pty >> 3;
msb               123 drivers/media/platform/vivid/vivid-rds-gen.c 			data[3].msb |= 0x1f << 3;
msb                85 drivers/media/radio/si4713/si4713.c #define compose_u16(msb, lsb)	(((u16)msb << 8) | lsb)
msb               269 drivers/media/radio/si4713/si4713.c 		msb(prop),
msb               308 drivers/media/radio/si4713/si4713.c 		msb(prop),
msb               310 drivers/media/radio/si4713/si4713.c 		msb(val),
msb               549 drivers/media/radio/si4713/si4713.c 		msb(frequency),
msb               643 drivers/media/radio/si4713/si4713.c 		msb(frequency),
msb               732 drivers/media/radio/si4713/si4713.c 		msb(rdsb),
msb               734 drivers/media/radio/si4713/si4713.c 		msb(rdsc),
msb               736 drivers/media/radio/si4713/si4713.c 		msb(rdsd),
msb                25 drivers/media/usb/as102/as102_fw.c 	char msb = tolower(*src) - '0';
msb                28 drivers/media/usb/as102/as102_fw.c 	if (msb > 9)
msb                29 drivers/media/usb/as102/as102_fw.c 		msb -= 7;
msb                33 drivers/media/usb/as102/as102_fw.c 	*dst = value = ((msb & 0xF) << 4) | (lsb & 0xF);
msb               147 drivers/memstick/core/ms_block.c static int msb_validate_used_block_bitmap(struct msb_data *msb)
msb               155 drivers/memstick/core/ms_block.c 	for (i = 0; i < msb->zone_count; i++)
msb               156 drivers/memstick/core/ms_block.c 		total_free_blocks += msb->free_block_count[i];
msb               158 drivers/memstick/core/ms_block.c 	if (msb->block_count - bitmap_weight(msb->used_blocks_bitmap,
msb               159 drivers/memstick/core/ms_block.c 					msb->block_count) == total_free_blocks)
msb               163 drivers/memstick/core/ms_block.c 	msb->read_only = true;
msb               168 drivers/memstick/core/ms_block.c static void msb_mark_block_used(struct msb_data *msb, int pba)
msb               172 drivers/memstick/core/ms_block.c 	if (test_bit(pba, msb->used_blocks_bitmap)) {
msb               175 drivers/memstick/core/ms_block.c 		msb->read_only = true;
msb               179 drivers/memstick/core/ms_block.c 	if (msb_validate_used_block_bitmap(msb))
msb               183 drivers/memstick/core/ms_block.c 	__set_bit(pba, msb->used_blocks_bitmap);
msb               184 drivers/memstick/core/ms_block.c 	msb->free_block_count[zone]--;
msb               188 drivers/memstick/core/ms_block.c static void msb_mark_block_unused(struct msb_data *msb, int pba)
msb               192 drivers/memstick/core/ms_block.c 	if (!test_bit(pba, msb->used_blocks_bitmap)) {
msb               194 drivers/memstick/core/ms_block.c 		msb->read_only = true;
msb               198 drivers/memstick/core/ms_block.c 	if (msb_validate_used_block_bitmap(msb))
msb               202 drivers/memstick/core/ms_block.c 	__clear_bit(pba, msb->used_blocks_bitmap);
msb               203 drivers/memstick/core/ms_block.c 	msb->free_block_count[zone]++;
msb               207 drivers/memstick/core/ms_block.c static void msb_invalidate_reg_window(struct msb_data *msb)
msb               209 drivers/memstick/core/ms_block.c 	msb->reg_addr.w_offset = offsetof(struct ms_register, id);
msb               210 drivers/memstick/core/ms_block.c 	msb->reg_addr.w_length = sizeof(struct ms_id_register);
msb               211 drivers/memstick/core/ms_block.c 	msb->reg_addr.r_offset = offsetof(struct ms_register, id);
msb               212 drivers/memstick/core/ms_block.c 	msb->reg_addr.r_length = sizeof(struct ms_id_register);
msb               213 drivers/memstick/core/ms_block.c 	msb->addr_valid = false;
msb               217 drivers/memstick/core/ms_block.c static int msb_run_state_machine(struct msb_data *msb, int   (*state_func)
msb               220 drivers/memstick/core/ms_block.c 	struct memstick_dev *card = msb->card;
msb               222 drivers/memstick/core/ms_block.c 	WARN_ON(msb->state != -1);
msb               223 drivers/memstick/core/ms_block.c 	msb->int_polling = false;
msb               224 drivers/memstick/core/ms_block.c 	msb->state = 0;
msb               225 drivers/memstick/core/ms_block.c 	msb->exit_error = 0;
msb               233 drivers/memstick/core/ms_block.c 	WARN_ON(msb->state != -1);
msb               234 drivers/memstick/core/ms_block.c 	return msb->exit_error;
msb               238 drivers/memstick/core/ms_block.c static int msb_exit_state_machine(struct msb_data *msb, int error)
msb               240 drivers/memstick/core/ms_block.c 	WARN_ON(msb->state == -1);
msb               242 drivers/memstick/core/ms_block.c 	msb->state = -1;
msb               243 drivers/memstick/core/ms_block.c 	msb->exit_error = error;
msb               244 drivers/memstick/core/ms_block.c 	msb->card->next_request = h_msb_default_bad;
msb               248 drivers/memstick/core/ms_block.c 		msb_invalidate_reg_window(msb);
msb               250 drivers/memstick/core/ms_block.c 	complete(&msb->card->mrq_complete);
msb               255 drivers/memstick/core/ms_block.c static int msb_read_int_reg(struct msb_data *msb, long timeout)
msb               257 drivers/memstick/core/ms_block.c 	struct memstick_request *mrq = &msb->card->current_mrq;
msb               259 drivers/memstick/core/ms_block.c 	WARN_ON(msb->state == -1);
msb               261 drivers/memstick/core/ms_block.c 	if (!msb->int_polling) {
msb               262 drivers/memstick/core/ms_block.c 		msb->int_timeout = jiffies +
msb               264 drivers/memstick/core/ms_block.c 		msb->int_polling = true;
msb               265 drivers/memstick/core/ms_block.c 	} else if (time_after(jiffies, msb->int_timeout)) {
msb               270 drivers/memstick/core/ms_block.c 	if ((msb->caps & MEMSTICK_CAP_AUTO_GET_INT) &&
msb               282 drivers/memstick/core/ms_block.c static int msb_read_regs(struct msb_data *msb, int offset, int len)
msb               284 drivers/memstick/core/ms_block.c 	struct memstick_request *req = &msb->card->current_mrq;
msb               286 drivers/memstick/core/ms_block.c 	if (msb->reg_addr.r_offset != offset ||
msb               287 drivers/memstick/core/ms_block.c 	    msb->reg_addr.r_length != len || !msb->addr_valid) {
msb               289 drivers/memstick/core/ms_block.c 		msb->reg_addr.r_offset = offset;
msb               290 drivers/memstick/core/ms_block.c 		msb->reg_addr.r_length = len;
msb               291 drivers/memstick/core/ms_block.c 		msb->addr_valid = true;
msb               294 drivers/memstick/core/ms_block.c 			&msb->reg_addr, sizeof(msb->reg_addr));
msb               303 drivers/memstick/core/ms_block.c static int msb_write_regs(struct msb_data *msb, int offset, int len, void *buf)
msb               305 drivers/memstick/core/ms_block.c 	struct memstick_request *req = &msb->card->current_mrq;
msb               307 drivers/memstick/core/ms_block.c 	if (msb->reg_addr.w_offset != offset ||
msb               308 drivers/memstick/core/ms_block.c 		msb->reg_addr.w_length != len  || !msb->addr_valid) {
msb               310 drivers/memstick/core/ms_block.c 		msb->reg_addr.w_offset = offset;
msb               311 drivers/memstick/core/ms_block.c 		msb->reg_addr.w_length = len;
msb               312 drivers/memstick/core/ms_block.c 		msb->addr_valid = true;
msb               315 drivers/memstick/core/ms_block.c 			&msb->reg_addr, sizeof(msb->reg_addr));
msb               338 drivers/memstick/core/ms_block.c 	struct msb_data *msb = memstick_get_drvdata(card);
msb               345 drivers/memstick/core/ms_block.c 		return msb_exit_state_machine(msb, mrq->error);
msb               348 drivers/memstick/core/ms_block.c 	switch (msb->state) {
msb               353 drivers/memstick/core/ms_block.c 		if (!msb_write_regs(msb,
msb               356 drivers/memstick/core/ms_block.c 			(unsigned char *)&msb->regs.param))
msb               359 drivers/memstick/core/ms_block.c 		msb->state = MSB_RP_SEND_READ_COMMAND;
msb               365 drivers/memstick/core/ms_block.c 		msb->state = MSB_RP_SEND_INT_REQ;
msb               369 drivers/memstick/core/ms_block.c 		msb->state = MSB_RP_RECEIVE_INT_REQ_RESULT;
msb               372 drivers/memstick/core/ms_block.c 		if (msb_read_int_reg(msb, -1))
msb               378 drivers/memstick/core/ms_block.c 		msb->regs.status.interrupt = intreg;
msb               381 drivers/memstick/core/ms_block.c 			return msb_exit_state_machine(msb, -EIO);
msb               384 drivers/memstick/core/ms_block.c 			msb->state = MSB_RP_SEND_INT_REQ;
msb               388 drivers/memstick/core/ms_block.c 		msb->int_polling = false;
msb               389 drivers/memstick/core/ms_block.c 		msb->state = (intreg & MEMSTICK_INT_ERR) ?
msb               395 drivers/memstick/core/ms_block.c 		if (!msb_read_regs(msb,
msb               400 drivers/memstick/core/ms_block.c 		msb->state = MSB_RP_RECEIVE_STATUS_REG;
msb               404 drivers/memstick/core/ms_block.c 		msb->regs.status = *(struct ms_status_register *)mrq->data;
msb               405 drivers/memstick/core/ms_block.c 		msb->state = MSB_RP_SEND_OOB_READ;
msb               409 drivers/memstick/core/ms_block.c 		if (!msb_read_regs(msb,
msb               414 drivers/memstick/core/ms_block.c 		msb->state = MSB_RP_RECEIVE_OOB_READ;
msb               418 drivers/memstick/core/ms_block.c 		msb->regs.extra_data =
msb               420 drivers/memstick/core/ms_block.c 		msb->state = MSB_RP_SEND_READ_DATA;
msb               425 drivers/memstick/core/ms_block.c 		if (msb->regs.param.cp == MEMSTICK_CP_EXTRA) {
msb               426 drivers/memstick/core/ms_block.c 			msb->state = MSB_RP_RECEIVE_READ_DATA;
msb               431 drivers/memstick/core/ms_block.c 		msb_sg_copy(msb->current_sg, sg, ARRAY_SIZE(sg),
msb               432 drivers/memstick/core/ms_block.c 			msb->current_sg_offset,
msb               433 drivers/memstick/core/ms_block.c 			msb->page_size);
msb               436 drivers/memstick/core/ms_block.c 		msb->state = MSB_RP_RECEIVE_READ_DATA;
msb               440 drivers/memstick/core/ms_block.c 		if (!(msb->regs.status.interrupt & MEMSTICK_INT_ERR)) {
msb               441 drivers/memstick/core/ms_block.c 			msb->current_sg_offset += msb->page_size;
msb               442 drivers/memstick/core/ms_block.c 			return msb_exit_state_machine(msb, 0);
msb               445 drivers/memstick/core/ms_block.c 		if (msb->regs.status.status1 & MEMSTICK_UNCORR_ERROR) {
msb               447 drivers/memstick/core/ms_block.c 			return msb_exit_state_machine(msb, -EBADMSG);
msb               450 drivers/memstick/core/ms_block.c 		if (msb->regs.status.status1 & MEMSTICK_CORR_ERROR) {
msb               452 drivers/memstick/core/ms_block.c 			msb->current_sg_offset += msb->page_size;
msb               453 drivers/memstick/core/ms_block.c 			return msb_exit_state_machine(msb, -EUCLEAN);
msb               456 drivers/memstick/core/ms_block.c 			return msb_exit_state_machine(msb, -EIO);
msb               474 drivers/memstick/core/ms_block.c 	struct msb_data *msb = memstick_get_drvdata(card);
msb               480 drivers/memstick/core/ms_block.c 		return msb_exit_state_machine(msb, mrq->error);
msb               483 drivers/memstick/core/ms_block.c 	switch (msb->state) {
msb               492 drivers/memstick/core/ms_block.c 		if (!msb_write_regs(msb,
msb               495 drivers/memstick/core/ms_block.c 			&msb->regs.param))
msb               498 drivers/memstick/core/ms_block.c 		msb->state = MSB_WB_SEND_WRITE_OOB;
msb               502 drivers/memstick/core/ms_block.c 		if (!msb_write_regs(msb,
msb               505 drivers/memstick/core/ms_block.c 			&msb->regs.extra_data))
msb               507 drivers/memstick/core/ms_block.c 		msb->state = MSB_WB_SEND_WRITE_COMMAND;
msb               514 drivers/memstick/core/ms_block.c 		msb->state = MSB_WB_SEND_INT_REQ;
msb               518 drivers/memstick/core/ms_block.c 		msb->state = MSB_WB_RECEIVE_INT_REQ;
msb               519 drivers/memstick/core/ms_block.c 		if (msb_read_int_reg(msb, -1))
msb               525 drivers/memstick/core/ms_block.c 		msb->regs.status.interrupt = intreg;
msb               529 drivers/memstick/core/ms_block.c 			return msb_exit_state_machine(msb, -EIO);
msb               532 drivers/memstick/core/ms_block.c 			return msb_exit_state_machine(msb, -EBADMSG);
msb               536 drivers/memstick/core/ms_block.c 		if (msb->current_page == msb->pages_in_block) {
msb               538 drivers/memstick/core/ms_block.c 				return msb_exit_state_machine(msb, 0);
msb               539 drivers/memstick/core/ms_block.c 			msb->state = MSB_WB_SEND_INT_REQ;
msb               546 drivers/memstick/core/ms_block.c 			msb->state = MSB_WB_SEND_INT_REQ;
msb               550 drivers/memstick/core/ms_block.c 		msb->int_polling = false;
msb               551 drivers/memstick/core/ms_block.c 		msb->state = MSB_WB_SEND_WRITE_DATA;
msb               557 drivers/memstick/core/ms_block.c 		if (msb_sg_copy(msb->current_sg, sg, ARRAY_SIZE(sg),
msb               558 drivers/memstick/core/ms_block.c 			msb->current_sg_offset,
msb               559 drivers/memstick/core/ms_block.c 			msb->page_size) < msb->page_size)
msb               560 drivers/memstick/core/ms_block.c 			return msb_exit_state_machine(msb, -EIO);
msb               564 drivers/memstick/core/ms_block.c 		msb->state = MSB_WB_RECEIVE_WRITE_CONFIRMATION;
msb               568 drivers/memstick/core/ms_block.c 		msb->current_page++;
msb               569 drivers/memstick/core/ms_block.c 		msb->current_sg_offset += msb->page_size;
msb               570 drivers/memstick/core/ms_block.c 		msb->state = MSB_WB_SEND_INT_REQ;
msb               586 drivers/memstick/core/ms_block.c 	struct msb_data *msb = memstick_get_drvdata(card);
msb               592 drivers/memstick/core/ms_block.c 		return msb_exit_state_machine(msb, mrq->error);
msb               595 drivers/memstick/core/ms_block.c 	switch (msb->state) {
msb               599 drivers/memstick/core/ms_block.c 		if (!msb_write_regs(msb,
msb               602 drivers/memstick/core/ms_block.c 			&msb->regs.param))
msb               604 drivers/memstick/core/ms_block.c 		msb->state = MSB_SC_SEND_WRITE_OOB;
msb               608 drivers/memstick/core/ms_block.c 		if (!msb->command_need_oob) {
msb               609 drivers/memstick/core/ms_block.c 			msb->state = MSB_SC_SEND_COMMAND;
msb               613 drivers/memstick/core/ms_block.c 		if (!msb_write_regs(msb,
msb               616 drivers/memstick/core/ms_block.c 			&msb->regs.extra_data))
msb               619 drivers/memstick/core/ms_block.c 		msb->state = MSB_SC_SEND_COMMAND;
msb               623 drivers/memstick/core/ms_block.c 		memstick_init_req(mrq, MS_TPC_SET_CMD, &msb->command_value, 1);
msb               624 drivers/memstick/core/ms_block.c 		msb->state = MSB_SC_SEND_INT_REQ;
msb               628 drivers/memstick/core/ms_block.c 		msb->state = MSB_SC_RECEIVE_INT_REQ;
msb               629 drivers/memstick/core/ms_block.c 		if (msb_read_int_reg(msb, -1))
msb               637 drivers/memstick/core/ms_block.c 			return msb_exit_state_machine(msb, -EIO);
msb               639 drivers/memstick/core/ms_block.c 			return msb_exit_state_machine(msb, -EBADMSG);
msb               642 drivers/memstick/core/ms_block.c 			msb->state = MSB_SC_SEND_INT_REQ;
msb               646 drivers/memstick/core/ms_block.c 		return msb_exit_state_machine(msb, 0);
msb               657 drivers/memstick/core/ms_block.c 	struct msb_data *msb = memstick_get_drvdata(card);
msb               661 drivers/memstick/core/ms_block.c 		return msb_exit_state_machine(msb, mrq->error);
msb               663 drivers/memstick/core/ms_block.c 	switch (msb->state) {
msb               667 drivers/memstick/core/ms_block.c 		msb->state = MSB_RS_CONFIRM;
msb               670 drivers/memstick/core/ms_block.c 		return msb_exit_state_machine(msb, 0);
msb               679 drivers/memstick/core/ms_block.c 	struct msb_data *msb = memstick_get_drvdata(card);
msb               685 drivers/memstick/core/ms_block.c 		msb->regs.param.system &= ~MEMSTICK_SYS_PAM;
msb               686 drivers/memstick/core/ms_block.c 		return msb_exit_state_machine(msb, mrq->error);
msb               689 drivers/memstick/core/ms_block.c 	switch (msb->state) {
msb               692 drivers/memstick/core/ms_block.c 		msb->regs.param.system |= MEMSTICK_SYS_PAM;
msb               694 drivers/memstick/core/ms_block.c 		if (!msb_write_regs(msb,
msb               697 drivers/memstick/core/ms_block.c 			(unsigned char *)&msb->regs.param))
msb               700 drivers/memstick/core/ms_block.c 		msb->state = MSB_PS_SWICH_HOST;
msb               708 drivers/memstick/core/ms_block.c 		msb->state = MSB_PS_CONFIRM;
msb               712 drivers/memstick/core/ms_block.c 		return msb_exit_state_machine(msb, 0);
msb               718 drivers/memstick/core/ms_block.c static int msb_switch_to_parallel(struct msb_data *msb);
msb               721 drivers/memstick/core/ms_block.c static int msb_reset(struct msb_data *msb, bool full)
msb               724 drivers/memstick/core/ms_block.c 	bool was_parallel = msb->regs.param.system & MEMSTICK_SYS_PAM;
msb               725 drivers/memstick/core/ms_block.c 	struct memstick_dev *card = msb->card;
msb               730 drivers/memstick/core/ms_block.c 	msb->regs.param.system = MEMSTICK_SYS_BAMD;
msb               738 drivers/memstick/core/ms_block.c 		msb_invalidate_reg_window(msb);
msb               750 drivers/memstick/core/ms_block.c 			msb->read_only = true;
msb               755 drivers/memstick/core/ms_block.c 	error = msb_run_state_machine(msb, h_msb_reset);
msb               758 drivers/memstick/core/ms_block.c 		msb->read_only = true;
msb               764 drivers/memstick/core/ms_block.c 		msb_switch_to_parallel(msb);
msb               769 drivers/memstick/core/ms_block.c static int msb_switch_to_parallel(struct msb_data *msb)
msb               773 drivers/memstick/core/ms_block.c 	error = msb_run_state_machine(msb, h_msb_parallel_switch);
msb               776 drivers/memstick/core/ms_block.c 		msb->regs.param.system &= ~MEMSTICK_SYS_PAM;
msb               777 drivers/memstick/core/ms_block.c 		msb_reset(msb, true);
msb               781 drivers/memstick/core/ms_block.c 	msb->caps |= MEMSTICK_CAP_AUTO_GET_INT;
msb               786 drivers/memstick/core/ms_block.c static int msb_set_overwrite_flag(struct msb_data *msb,
msb               789 drivers/memstick/core/ms_block.c 	if (msb->read_only)
msb               792 drivers/memstick/core/ms_block.c 	msb->regs.param.block_address = cpu_to_be16(pba);
msb               793 drivers/memstick/core/ms_block.c 	msb->regs.param.page_address = page;
msb               794 drivers/memstick/core/ms_block.c 	msb->regs.param.cp = MEMSTICK_CP_OVERWRITE;
msb               795 drivers/memstick/core/ms_block.c 	msb->regs.extra_data.overwrite_flag = flag;
msb               796 drivers/memstick/core/ms_block.c 	msb->command_value = MS_CMD_BLOCK_WRITE;
msb               797 drivers/memstick/core/ms_block.c 	msb->command_need_oob = true;
msb               801 drivers/memstick/core/ms_block.c 	return msb_run_state_machine(msb, h_msb_send_command);
msb               804 drivers/memstick/core/ms_block.c static int msb_mark_bad(struct msb_data *msb, int pba)
msb               807 drivers/memstick/core/ms_block.c 	msb_reset(msb, true);
msb               809 drivers/memstick/core/ms_block.c 			msb, pba, 0, 0xFF & ~MEMSTICK_OVERWRITE_BKST);
msb               812 drivers/memstick/core/ms_block.c static int msb_mark_page_bad(struct msb_data *msb, int pba, int page)
msb               815 drivers/memstick/core/ms_block.c 	msb_reset(msb, true);
msb               816 drivers/memstick/core/ms_block.c 	return msb_set_overwrite_flag(msb,
msb               821 drivers/memstick/core/ms_block.c static int msb_erase_block(struct msb_data *msb, u16 pba)
msb               824 drivers/memstick/core/ms_block.c 	if (msb->read_only)
msb               830 drivers/memstick/core/ms_block.c 		msb->regs.param.block_address = cpu_to_be16(pba);
msb               831 drivers/memstick/core/ms_block.c 		msb->regs.param.page_address = 0;
msb               832 drivers/memstick/core/ms_block.c 		msb->regs.param.cp = MEMSTICK_CP_BLOCK;
msb               833 drivers/memstick/core/ms_block.c 		msb->command_value = MS_CMD_BLOCK_ERASE;
msb               834 drivers/memstick/core/ms_block.c 		msb->command_need_oob = false;
msb               837 drivers/memstick/core/ms_block.c 		error = msb_run_state_machine(msb, h_msb_send_command);
msb               838 drivers/memstick/core/ms_block.c 		if (!error || msb_reset(msb, true))
msb               844 drivers/memstick/core/ms_block.c 		msb_mark_bad(msb, pba);
msb               848 drivers/memstick/core/ms_block.c 	msb_mark_block_unused(msb, pba);
msb               849 drivers/memstick/core/ms_block.c 	__set_bit(pba, msb->erased_blocks_bitmap);
msb               854 drivers/memstick/core/ms_block.c static int msb_read_page(struct msb_data *msb,
msb               863 drivers/memstick/core/ms_block.c 		size_t len = msb->page_size;
msb               897 drivers/memstick/core/ms_block.c 	if (pba >= msb->block_count) {
msb               903 drivers/memstick/core/ms_block.c 		msb->regs.param.block_address = cpu_to_be16(pba);
msb               904 drivers/memstick/core/ms_block.c 		msb->regs.param.page_address = page;
msb               905 drivers/memstick/core/ms_block.c 		msb->regs.param.cp = MEMSTICK_CP_PAGE;
msb               907 drivers/memstick/core/ms_block.c 		msb->current_sg = sg;
msb               908 drivers/memstick/core/ms_block.c 		msb->current_sg_offset = offset;
msb               909 drivers/memstick/core/ms_block.c 		error = msb_run_state_machine(msb, h_msb_read_page);
msb               919 drivers/memstick/core/ms_block.c 			*extra = msb->regs.extra_data;
msb               921 drivers/memstick/core/ms_block.c 		if (!error || msb_reset(msb, true))
msb               931 drivers/memstick/core/ms_block.c 		if (msb->regs.extra_data.overwrite_flag &
msb               933 drivers/memstick/core/ms_block.c 			msb_mark_page_bad(msb, pba, page);
msb               944 drivers/memstick/core/ms_block.c static int msb_read_oob(struct msb_data *msb, u16 pba, u16 page,
msb               950 drivers/memstick/core/ms_block.c 	msb->regs.param.block_address = cpu_to_be16(pba);
msb               951 drivers/memstick/core/ms_block.c 	msb->regs.param.page_address = page;
msb               952 drivers/memstick/core/ms_block.c 	msb->regs.param.cp = MEMSTICK_CP_EXTRA;
msb               954 drivers/memstick/core/ms_block.c 	if (pba > msb->block_count) {
msb               959 drivers/memstick/core/ms_block.c 	error = msb_run_state_machine(msb, h_msb_read_page);
msb               960 drivers/memstick/core/ms_block.c 	*extra = msb->regs.extra_data;
msb               972 drivers/memstick/core/ms_block.c static int msb_verify_block(struct msb_data *msb, u16 pba,
msb               978 drivers/memstick/core/ms_block.c 	sg_init_one(&sg, msb->block_buffer, msb->block_size);
msb               980 drivers/memstick/core/ms_block.c 	while (page < msb->pages_in_block) {
msb               982 drivers/memstick/core/ms_block.c 		error = msb_read_page(msb, pba, page,
msb               983 drivers/memstick/core/ms_block.c 				NULL, &sg, page * msb->page_size);
msb               990 drivers/memstick/core/ms_block.c 				msb->block_buffer, msb->block_size))
msb               996 drivers/memstick/core/ms_block.c static int msb_write_block(struct msb_data *msb,
msb              1000 drivers/memstick/core/ms_block.c 	BUG_ON(sg->length < msb->page_size);
msb              1002 drivers/memstick/core/ms_block.c 	if (msb->read_only)
msb              1011 drivers/memstick/core/ms_block.c 	if (pba >= msb->block_count || lba >= msb->logical_block_count) {
msb              1022 drivers/memstick/core/ms_block.c 	if (pba == msb->boot_block_locations[0] ||
msb              1023 drivers/memstick/core/ms_block.c 		pba == msb->boot_block_locations[1]) {
msb              1030 drivers/memstick/core/ms_block.c 		if (msb->read_only)
msb              1033 drivers/memstick/core/ms_block.c 		msb->regs.param.cp = MEMSTICK_CP_BLOCK;
msb              1034 drivers/memstick/core/ms_block.c 		msb->regs.param.page_address = 0;
msb              1035 drivers/memstick/core/ms_block.c 		msb->regs.param.block_address = cpu_to_be16(pba);
msb              1037 drivers/memstick/core/ms_block.c 		msb->regs.extra_data.management_flag = 0xFF;
msb              1038 drivers/memstick/core/ms_block.c 		msb->regs.extra_data.overwrite_flag = 0xF8;
msb              1039 drivers/memstick/core/ms_block.c 		msb->regs.extra_data.logical_address = cpu_to_be16(lba);
msb              1041 drivers/memstick/core/ms_block.c 		msb->current_sg = sg;
msb              1042 drivers/memstick/core/ms_block.c 		msb->current_sg_offset = offset;
msb              1043 drivers/memstick/core/ms_block.c 		msb->current_page = 0;
msb              1045 drivers/memstick/core/ms_block.c 		error = msb_run_state_machine(msb, h_msb_write_block);
msb              1054 drivers/memstick/core/ms_block.c 				!test_bit(pba, msb->erased_blocks_bitmap)))
msb              1055 drivers/memstick/core/ms_block.c 			error = msb_verify_block(msb, pba, sg, offset);
msb              1060 drivers/memstick/core/ms_block.c 		if (current_try > 1 || msb_reset(msb, true))
msb              1064 drivers/memstick/core/ms_block.c 		error = msb_erase_block(msb, pba);
msb              1074 drivers/memstick/core/ms_block.c static u16 msb_get_free_block(struct msb_data *msb, int zone)
msb              1082 drivers/memstick/core/ms_block.c 	if (!msb->free_block_count[zone]) {
msb              1084 drivers/memstick/core/ms_block.c 		msb->read_only = true;
msb              1088 drivers/memstick/core/ms_block.c 	pos %= msb->free_block_count[zone];
msb              1091 drivers/memstick/core/ms_block.c 		msb->free_block_count[zone], pos);
msb              1093 drivers/memstick/core/ms_block.c 	pba = find_next_zero_bit(msb->used_blocks_bitmap,
msb              1094 drivers/memstick/core/ms_block.c 							msb->block_count, pba);
msb              1096 drivers/memstick/core/ms_block.c 		pba = find_next_zero_bit(msb->used_blocks_bitmap,
msb              1097 drivers/memstick/core/ms_block.c 						msb->block_count, pba + 1);
msb              1101 drivers/memstick/core/ms_block.c 	if (pba == msb->block_count || (msb_get_zone_from_pba(pba)) != zone) {
msb              1103 drivers/memstick/core/ms_block.c 		msb->read_only = true;
msb              1107 drivers/memstick/core/ms_block.c 	msb_mark_block_used(msb, pba);
msb              1111 drivers/memstick/core/ms_block.c static int msb_update_block(struct msb_data *msb, u16 lba,
msb              1117 drivers/memstick/core/ms_block.c 	pba = msb->lba_to_pba_table[lba];
msb              1122 drivers/memstick/core/ms_block.c 		msb_set_overwrite_flag(msb, pba, 0,
msb              1127 drivers/memstick/core/ms_block.c 		new_pba = msb_get_free_block(msb,
msb              1137 drivers/memstick/core/ms_block.c 		error = msb_write_block(msb, new_pba, lba, sg, offset);
msb              1139 drivers/memstick/core/ms_block.c 			msb_mark_bad(msb, new_pba);
msb              1147 drivers/memstick/core/ms_block.c 		msb_erase_block(msb, pba);
msb              1148 drivers/memstick/core/ms_block.c 		msb->lba_to_pba_table[lba] = new_pba;
msb              1154 drivers/memstick/core/ms_block.c 		msb->read_only = true;
msb              1186 drivers/memstick/core/ms_block.c static int msb_read_boot_blocks(struct msb_data *msb)
msb              1193 drivers/memstick/core/ms_block.c 	msb->boot_block_locations[0] = MS_BLOCK_INVALID;
msb              1194 drivers/memstick/core/ms_block.c 	msb->boot_block_locations[1] = MS_BLOCK_INVALID;
msb              1195 drivers/memstick/core/ms_block.c 	msb->boot_block_count = 0;
msb              1199 drivers/memstick/core/ms_block.c 	if (!msb->boot_page) {
msb              1205 drivers/memstick/core/ms_block.c 		msb->boot_page = page;
msb              1207 drivers/memstick/core/ms_block.c 		page = msb->boot_page;
msb              1209 drivers/memstick/core/ms_block.c 	msb->block_count = MS_BLOCK_MAX_BOOT_ADDR;
msb              1214 drivers/memstick/core/ms_block.c 		if (msb_read_page(msb, pba, 0, &extra, &sg, 0)) {
msb              1231 drivers/memstick/core/ms_block.c 		msb->boot_block_locations[msb->boot_block_count] = pba;
msb              1234 drivers/memstick/core/ms_block.c 		msb->boot_block_count++;
msb              1236 drivers/memstick/core/ms_block.c 		if (msb->boot_block_count == 2)
msb              1240 drivers/memstick/core/ms_block.c 	if (!msb->boot_block_count) {
msb              1249 drivers/memstick/core/ms_block.c static int msb_read_bad_block_table(struct msb_data *msb, int block_nr)
msb              1260 drivers/memstick/core/ms_block.c 	boot_block = &msb->boot_page[block_nr];
msb              1261 drivers/memstick/core/ms_block.c 	pba = msb->boot_block_locations[block_nr];
msb              1263 drivers/memstick/core/ms_block.c 	if (msb->boot_block_locations[block_nr] == MS_BLOCK_INVALID)
msb              1272 drivers/memstick/core/ms_block.c 	page = data_offset / msb->page_size;
msb              1273 drivers/memstick/core/ms_block.c 	page_offset = data_offset % msb->page_size;
msb              1275 drivers/memstick/core/ms_block.c 		DIV_ROUND_UP(data_size + page_offset, msb->page_size) *
msb              1276 drivers/memstick/core/ms_block.c 			msb->page_size;
msb              1289 drivers/memstick/core/ms_block.c 		error = msb_read_page(msb, pba, page, NULL, &sg, offset);
msb              1294 drivers/memstick/core/ms_block.c 		offset += msb->page_size;
msb              1296 drivers/memstick/core/ms_block.c 		if (page == msb->pages_in_block) {
msb              1308 drivers/memstick/core/ms_block.c 		if (bad_block >= msb->block_count) {
msb              1314 drivers/memstick/core/ms_block.c 		if (test_bit(bad_block, msb->used_blocks_bitmap))  {
msb              1321 drivers/memstick/core/ms_block.c 		msb_mark_block_used(msb, bad_block);
msb              1328 drivers/memstick/core/ms_block.c static int msb_ftl_initialize(struct msb_data *msb)
msb              1332 drivers/memstick/core/ms_block.c 	if (msb->ftl_initialized)
msb              1335 drivers/memstick/core/ms_block.c 	msb->zone_count = msb->block_count / MS_BLOCKS_IN_ZONE;
msb              1336 drivers/memstick/core/ms_block.c 	msb->logical_block_count = msb->zone_count * 496 - 2;
msb              1338 drivers/memstick/core/ms_block.c 	msb->used_blocks_bitmap = kzalloc(msb->block_count / 8, GFP_KERNEL);
msb              1339 drivers/memstick/core/ms_block.c 	msb->erased_blocks_bitmap = kzalloc(msb->block_count / 8, GFP_KERNEL);
msb              1340 drivers/memstick/core/ms_block.c 	msb->lba_to_pba_table =
msb              1341 drivers/memstick/core/ms_block.c 		kmalloc_array(msb->logical_block_count, sizeof(u16),
msb              1344 drivers/memstick/core/ms_block.c 	if (!msb->used_blocks_bitmap || !msb->lba_to_pba_table ||
msb              1345 drivers/memstick/core/ms_block.c 						!msb->erased_blocks_bitmap) {
msb              1346 drivers/memstick/core/ms_block.c 		kfree(msb->used_blocks_bitmap);
msb              1347 drivers/memstick/core/ms_block.c 		kfree(msb->lba_to_pba_table);
msb              1348 drivers/memstick/core/ms_block.c 		kfree(msb->erased_blocks_bitmap);
msb              1352 drivers/memstick/core/ms_block.c 	for (i = 0; i < msb->zone_count; i++)
msb              1353 drivers/memstick/core/ms_block.c 		msb->free_block_count[i] = MS_BLOCKS_IN_ZONE;
msb              1355 drivers/memstick/core/ms_block.c 	memset(msb->lba_to_pba_table, MS_BLOCK_INVALID,
msb              1356 drivers/memstick/core/ms_block.c 			msb->logical_block_count * sizeof(u16));
msb              1359 drivers/memstick/core/ms_block.c 		msb->zone_count, msb->logical_block_count);
msb              1361 drivers/memstick/core/ms_block.c 	msb->ftl_initialized = true;
msb              1365 drivers/memstick/core/ms_block.c static int msb_ftl_scan(struct msb_data *msb)
msb              1371 drivers/memstick/core/ms_block.c 	u8 *overwrite_flags = kzalloc(msb->block_count, GFP_KERNEL);
msb              1377 drivers/memstick/core/ms_block.c 	for (pba = 0; pba < msb->block_count; pba++) {
msb              1379 drivers/memstick/core/ms_block.c 		if (pba == msb->boot_block_locations[0] ||
msb              1380 drivers/memstick/core/ms_block.c 			pba == msb->boot_block_locations[1]) {
msb              1382 drivers/memstick/core/ms_block.c 			msb_mark_block_used(msb, pba);
msb              1386 drivers/memstick/core/ms_block.c 		if (test_bit(pba, msb->used_blocks_bitmap)) {
msb              1392 drivers/memstick/core/ms_block.c 		error = msb_read_oob(msb, pba, 0, &extra);
msb              1398 drivers/memstick/core/ms_block.c 			msb_mark_block_used(msb, pba);
msb              1399 drivers/memstick/core/ms_block.c 			msb_erase_block(msb, pba);
msb              1417 drivers/memstick/core/ms_block.c 			msb_mark_block_used(msb, pba);
msb              1426 drivers/memstick/core/ms_block.c 			msb_mark_block_used(msb, pba);
msb              1434 drivers/memstick/core/ms_block.c 			msb_mark_block_used(msb, pba);
msb              1435 drivers/memstick/core/ms_block.c 			msb_erase_block(msb, pba);
msb              1444 drivers/memstick/core/ms_block.c 		msb_mark_block_used(msb, pba);
msb              1450 drivers/memstick/core/ms_block.c 			msb_erase_block(msb, pba);
msb              1455 drivers/memstick/core/ms_block.c 		if (msb->lba_to_pba_table[lba] == MS_BLOCK_INVALID) {
msb              1457 drivers/memstick/core/ms_block.c 			msb->lba_to_pba_table[lba] = pba;
msb              1461 drivers/memstick/core/ms_block.c 		other_block = msb->lba_to_pba_table[lba];
msb              1469 drivers/memstick/core/ms_block.c 			msb_erase_block(msb, other_block);
msb              1470 drivers/memstick/core/ms_block.c 			msb->lba_to_pba_table[lba] = pba;
msb              1477 drivers/memstick/core/ms_block.c 			msb_erase_block(msb, pba);
msb              1484 drivers/memstick/core/ms_block.c 		msb_erase_block(msb, other_block);
msb              1485 drivers/memstick/core/ms_block.c 		msb->lba_to_pba_table[lba] = pba;
msb              1495 drivers/memstick/core/ms_block.c 	struct msb_data *msb = from_timer(msb, t, cache_flush_timer);
msb              1496 drivers/memstick/core/ms_block.c 	msb->need_flush_cache = true;
msb              1497 drivers/memstick/core/ms_block.c 	queue_work(msb->io_queue, &msb->io_work);
msb              1501 drivers/memstick/core/ms_block.c static void msb_cache_discard(struct msb_data *msb)
msb              1503 drivers/memstick/core/ms_block.c 	if (msb->cache_block_lba == MS_BLOCK_INVALID)
msb              1506 drivers/memstick/core/ms_block.c 	del_timer_sync(&msb->cache_flush_timer);
msb              1509 drivers/memstick/core/ms_block.c 	msb->cache_block_lba = MS_BLOCK_INVALID;
msb              1510 drivers/memstick/core/ms_block.c 	bitmap_zero(&msb->valid_cache_bitmap, msb->pages_in_block);
msb              1513 drivers/memstick/core/ms_block.c static int msb_cache_init(struct msb_data *msb)
msb              1515 drivers/memstick/core/ms_block.c 	timer_setup(&msb->cache_flush_timer, msb_cache_flush_timer, 0);
msb              1517 drivers/memstick/core/ms_block.c 	if (!msb->cache)
msb              1518 drivers/memstick/core/ms_block.c 		msb->cache = kzalloc(msb->block_size, GFP_KERNEL);
msb              1519 drivers/memstick/core/ms_block.c 	if (!msb->cache)
msb              1522 drivers/memstick/core/ms_block.c 	msb_cache_discard(msb);
msb              1526 drivers/memstick/core/ms_block.c static int msb_cache_flush(struct msb_data *msb)
msb              1533 drivers/memstick/core/ms_block.c 	if (msb->read_only)
msb              1536 drivers/memstick/core/ms_block.c 	if (msb->cache_block_lba == MS_BLOCK_INVALID)
msb              1539 drivers/memstick/core/ms_block.c 	lba = msb->cache_block_lba;
msb              1540 drivers/memstick/core/ms_block.c 	pba = msb->lba_to_pba_table[lba];
msb              1543 drivers/memstick/core/ms_block.c 						pba, msb->cache_block_lba);
msb              1545 drivers/memstick/core/ms_block.c 	sg_init_one(&sg, msb->cache , msb->block_size);
msb              1548 drivers/memstick/core/ms_block.c 	for (page = 0; page < msb->pages_in_block; page++) {
msb              1550 drivers/memstick/core/ms_block.c 		if (test_bit(page, &msb->valid_cache_bitmap))
msb              1553 drivers/memstick/core/ms_block.c 		offset = page * msb->page_size;
msb              1557 drivers/memstick/core/ms_block.c 		error = msb_read_page(msb, pba, page, &extra, &sg, offset);
msb              1574 drivers/memstick/core/ms_block.c 		set_bit(page, &msb->valid_cache_bitmap);
msb              1578 drivers/memstick/core/ms_block.c 	error = msb_update_block(msb, msb->cache_block_lba, &sg, 0);
msb              1579 drivers/memstick/core/ms_block.c 	pba = msb->lba_to_pba_table[msb->cache_block_lba];
msb              1583 drivers/memstick/core/ms_block.c 		for (page = 0; page < msb->pages_in_block; page++) {
msb              1585 drivers/memstick/core/ms_block.c 			if (test_bit(page, &msb->valid_cache_bitmap))
msb              1590 drivers/memstick/core/ms_block.c 			msb_set_overwrite_flag(msb,
msb              1595 drivers/memstick/core/ms_block.c 	msb_cache_discard(msb);
msb              1599 drivers/memstick/core/ms_block.c static int msb_cache_write(struct msb_data *msb, int lba,
msb              1605 drivers/memstick/core/ms_block.c 	if (msb->read_only)
msb              1608 drivers/memstick/core/ms_block.c 	if (msb->cache_block_lba == MS_BLOCK_INVALID ||
msb              1609 drivers/memstick/core/ms_block.c 						lba != msb->cache_block_lba)
msb              1614 drivers/memstick/core/ms_block.c 	if (msb->cache_block_lba != MS_BLOCK_INVALID &&
msb              1615 drivers/memstick/core/ms_block.c 						lba != msb->cache_block_lba) {
msb              1617 drivers/memstick/core/ms_block.c 		error = msb_cache_flush(msb);
msb              1622 drivers/memstick/core/ms_block.c 	if (msb->cache_block_lba  == MS_BLOCK_INVALID) {
msb              1623 drivers/memstick/core/ms_block.c 		msb->cache_block_lba  = lba;
msb              1624 drivers/memstick/core/ms_block.c 		mod_timer(&msb->cache_flush_timer,
msb              1631 drivers/memstick/core/ms_block.c 	msb_sg_copy(sg, sg_tmp, ARRAY_SIZE(sg_tmp), offset, msb->page_size);
msb              1634 drivers/memstick/core/ms_block.c 		msb->cache + page * msb->page_size, msb->page_size);
msb              1636 drivers/memstick/core/ms_block.c 	set_bit(page, &msb->valid_cache_bitmap);
msb              1640 drivers/memstick/core/ms_block.c static int msb_cache_read(struct msb_data *msb, int lba,
msb              1643 drivers/memstick/core/ms_block.c 	int pba = msb->lba_to_pba_table[lba];
msb              1647 drivers/memstick/core/ms_block.c 	if (lba == msb->cache_block_lba &&
msb              1648 drivers/memstick/core/ms_block.c 			test_bit(page, &msb->valid_cache_bitmap)) {
msb              1655 drivers/memstick/core/ms_block.c 			offset, msb->page_size);
msb              1657 drivers/memstick/core/ms_block.c 			msb->cache + msb->page_size * page,
msb              1658 drivers/memstick/core/ms_block.c 							msb->page_size);
msb              1663 drivers/memstick/core/ms_block.c 		error = msb_read_page(msb, pba, page, NULL, sg, offset);
msb              1667 drivers/memstick/core/ms_block.c 		msb_cache_write(msb, lba, page, true, sg, offset);
msb              1692 drivers/memstick/core/ms_block.c 	struct msb_data *msb = memstick_get_drvdata(card);
msb              1697 drivers/memstick/core/ms_block.c 	msb->caps = 0;
msb              1701 drivers/memstick/core/ms_block.c 		msb->read_only = true;
msb              1703 drivers/memstick/core/ms_block.c 	msb->state = -1;
msb              1704 drivers/memstick/core/ms_block.c 	error = msb_reset(msb, false);
msb              1712 drivers/memstick/core/ms_block.c 		msb_switch_to_parallel(msb);
msb              1714 drivers/memstick/core/ms_block.c 	msb->page_size = sizeof(struct ms_boot_page);
msb              1717 drivers/memstick/core/ms_block.c 	error = msb_read_boot_blocks(msb);
msb              1721 drivers/memstick/core/ms_block.c 	boot_block = &msb->boot_page[0];
msb              1724 drivers/memstick/core/ms_block.c 	msb->block_count = boot_block->attr.number_of_blocks;
msb              1725 drivers/memstick/core/ms_block.c 	msb->page_size = boot_block->attr.page_size;
msb              1727 drivers/memstick/core/ms_block.c 	msb->pages_in_block = boot_block->attr.block_size * 2;
msb              1728 drivers/memstick/core/ms_block.c 	msb->block_size = msb->page_size * msb->pages_in_block;
msb              1730 drivers/memstick/core/ms_block.c 	if (msb->page_size > PAGE_SIZE) {
msb              1732 drivers/memstick/core/ms_block.c 		dbg("device page %d size isn't supported", msb->page_size);
msb              1736 drivers/memstick/core/ms_block.c 	msb->block_buffer = kzalloc(msb->block_size, GFP_KERNEL);
msb              1737 drivers/memstick/core/ms_block.c 	if (!msb->block_buffer)
msb              1740 drivers/memstick/core/ms_block.c 	raw_size_in_megs = (msb->block_size * msb->block_count) >> 20;
msb              1747 drivers/memstick/core/ms_block.c 		msb->geometry.cylinders = chs_table[i].cyl;
msb              1748 drivers/memstick/core/ms_block.c 		msb->geometry.heads = chs_table[i].head;
msb              1749 drivers/memstick/core/ms_block.c 		msb->geometry.sectors = chs_table[i].sec;
msb              1754 drivers/memstick/core/ms_block.c 		msb->caps |= MEMSTICK_CAP_PAR4;
msb              1757 drivers/memstick/core/ms_block.c 		msb->read_only = true;
msb              1759 drivers/memstick/core/ms_block.c 	dbg("Total block count = %d", msb->block_count);
msb              1760 drivers/memstick/core/ms_block.c 	dbg("Each block consists of %d pages", msb->pages_in_block);
msb              1761 drivers/memstick/core/ms_block.c 	dbg("Page size = %d bytes", msb->page_size);
msb              1762 drivers/memstick/core/ms_block.c 	dbg("Parallel mode supported: %d", !!(msb->caps & MEMSTICK_CAP_PAR4));
msb              1763 drivers/memstick/core/ms_block.c 	dbg("Read only: %d", msb->read_only);
msb              1767 drivers/memstick/core/ms_block.c 	if (host->caps & msb->caps & MEMSTICK_CAP_PAR4)
msb              1768 drivers/memstick/core/ms_block.c 		msb_switch_to_parallel(msb);
msb              1771 drivers/memstick/core/ms_block.c 	error = msb_cache_init(msb);
msb              1775 drivers/memstick/core/ms_block.c 	error = msb_ftl_initialize(msb);
msb              1781 drivers/memstick/core/ms_block.c 	error = msb_read_bad_block_table(msb, 0);
msb              1785 drivers/memstick/core/ms_block.c 		error = msb_read_bad_block_table(msb, 1);
msb              1792 drivers/memstick/core/ms_block.c 	error = msb_ftl_scan(msb);
msb              1802 drivers/memstick/core/ms_block.c static int msb_do_write_request(struct msb_data *msb, int lba,
msb              1810 drivers/memstick/core/ms_block.c 		if (page == 0 && len - offset >= msb->block_size) {
msb              1812 drivers/memstick/core/ms_block.c 			if (msb->cache_block_lba == lba)
msb              1813 drivers/memstick/core/ms_block.c 				msb_cache_discard(msb);
msb              1816 drivers/memstick/core/ms_block.c 			error = msb_update_block(msb, lba, sg, offset);
msb              1820 drivers/memstick/core/ms_block.c 			offset += msb->block_size;
msb              1821 drivers/memstick/core/ms_block.c 			*sucessfuly_written += msb->block_size;
msb              1826 drivers/memstick/core/ms_block.c 		error = msb_cache_write(msb, lba, page, false, sg, offset);
msb              1830 drivers/memstick/core/ms_block.c 		offset += msb->page_size;
msb              1831 drivers/memstick/core/ms_block.c 		*sucessfuly_written += msb->page_size;
msb              1834 drivers/memstick/core/ms_block.c 		if (page == msb->pages_in_block) {
msb              1842 drivers/memstick/core/ms_block.c static int msb_do_read_request(struct msb_data *msb, int lba,
msb              1851 drivers/memstick/core/ms_block.c 		error = msb_cache_read(msb, lba, page, sg, offset);
msb              1855 drivers/memstick/core/ms_block.c 		offset += msb->page_size;
msb              1856 drivers/memstick/core/ms_block.c 		*sucessfuly_read += msb->page_size;
msb              1859 drivers/memstick/core/ms_block.c 		if (page == msb->pages_in_block) {
msb              1869 drivers/memstick/core/ms_block.c 	struct msb_data *msb = container_of(work, struct msb_data, io_work);
msb              1872 drivers/memstick/core/ms_block.c 	struct scatterlist *sg = msb->prealloc_sg;
msb              1878 drivers/memstick/core/ms_block.c 		spin_lock_irq(&msb->q_lock);
msb              1880 drivers/memstick/core/ms_block.c 		if (msb->need_flush_cache) {
msb              1881 drivers/memstick/core/ms_block.c 			msb->need_flush_cache = false;
msb              1882 drivers/memstick/core/ms_block.c 			spin_unlock_irq(&msb->q_lock);
msb              1883 drivers/memstick/core/ms_block.c 			msb_cache_flush(msb);
msb              1887 drivers/memstick/core/ms_block.c 		req = msb->req;
msb              1890 drivers/memstick/core/ms_block.c 			spin_unlock_irq(&msb->q_lock);
msb              1894 drivers/memstick/core/ms_block.c 		spin_unlock_irq(&msb->q_lock);
msb              1898 drivers/memstick/core/ms_block.c 		blk_rq_map_sg(msb->queue, req, sg);
msb              1902 drivers/memstick/core/ms_block.c 		sector_div(lba, msb->page_size / 512);
msb              1903 drivers/memstick/core/ms_block.c 		page = sector_div(lba, msb->pages_in_block);
msb              1905 drivers/memstick/core/ms_block.c 		if (rq_data_dir(msb->req) == READ)
msb              1906 drivers/memstick/core/ms_block.c 			error = msb_do_read_request(msb, lba, page, sg,
msb              1909 drivers/memstick/core/ms_block.c 			error = msb_do_write_request(msb, lba, page, sg,
msb              1914 drivers/memstick/core/ms_block.c 			spin_lock_irq(&msb->q_lock);
msb              1915 drivers/memstick/core/ms_block.c 			msb->req = NULL;
msb              1916 drivers/memstick/core/ms_block.c 			spin_unlock_irq(&msb->q_lock);
msb              1919 drivers/memstick/core/ms_block.c 		if (error && msb->req) {
msb              1924 drivers/memstick/core/ms_block.c 			spin_lock_irq(&msb->q_lock);
msb              1925 drivers/memstick/core/ms_block.c 			msb->req = NULL;
msb              1926 drivers/memstick/core/ms_block.c 			spin_unlock_irq(&msb->q_lock);
msb              1929 drivers/memstick/core/ms_block.c 		if (msb->req)
msb              1940 drivers/memstick/core/ms_block.c 	struct msb_data *msb = disk->private_data;
msb              1946 drivers/memstick/core/ms_block.c 	if (msb && msb->card)
msb              1947 drivers/memstick/core/ms_block.c 		msb->usage_count++;
msb              1953 drivers/memstick/core/ms_block.c static void msb_data_clear(struct msb_data *msb)
msb              1955 drivers/memstick/core/ms_block.c 	kfree(msb->boot_page);
msb              1956 drivers/memstick/core/ms_block.c 	kfree(msb->used_blocks_bitmap);
msb              1957 drivers/memstick/core/ms_block.c 	kfree(msb->lba_to_pba_table);
msb              1958 drivers/memstick/core/ms_block.c 	kfree(msb->cache);
msb              1959 drivers/memstick/core/ms_block.c 	msb->card = NULL;
msb              1964 drivers/memstick/core/ms_block.c 	struct msb_data *msb = disk->private_data;
msb              1969 drivers/memstick/core/ms_block.c 	if (msb) {
msb              1970 drivers/memstick/core/ms_block.c 		if (msb->usage_count)
msb              1971 drivers/memstick/core/ms_block.c 			msb->usage_count--;
msb              1973 drivers/memstick/core/ms_block.c 		if (!msb->usage_count) {
msb              1975 drivers/memstick/core/ms_block.c 			idr_remove(&msb_disk_idr, msb->disk_id);
msb              1977 drivers/memstick/core/ms_block.c 			kfree(msb);
msb              1992 drivers/memstick/core/ms_block.c 	struct msb_data *msb = bdev->bd_disk->private_data;
msb              1993 drivers/memstick/core/ms_block.c 	*geo = msb->geometry;
msb              2001 drivers/memstick/core/ms_block.c 	struct msb_data *msb = memstick_get_drvdata(card);
msb              2006 drivers/memstick/core/ms_block.c 	spin_lock_irq(&msb->q_lock);
msb              2008 drivers/memstick/core/ms_block.c 	if (msb->card_dead) {
msb              2011 drivers/memstick/core/ms_block.c 		WARN_ON(!msb->io_queue_stopped);
msb              2013 drivers/memstick/core/ms_block.c 		spin_unlock_irq(&msb->q_lock);
msb              2018 drivers/memstick/core/ms_block.c 	if (msb->req) {
msb              2019 drivers/memstick/core/ms_block.c 		spin_unlock_irq(&msb->q_lock);
msb              2024 drivers/memstick/core/ms_block.c 	msb->req = req;
msb              2026 drivers/memstick/core/ms_block.c 	if (!msb->io_queue_stopped)
msb              2027 drivers/memstick/core/ms_block.c 		queue_work(msb->io_queue, &msb->io_work);
msb              2029 drivers/memstick/core/ms_block.c 	spin_unlock_irq(&msb->q_lock);
msb              2035 drivers/memstick/core/ms_block.c 	struct msb_data *msb = memstick_get_drvdata(card);
msb              2036 drivers/memstick/core/ms_block.c 	return (msb->card_dead == 0);
msb              2041 drivers/memstick/core/ms_block.c 	struct msb_data *msb = memstick_get_drvdata(card);
msb              2046 drivers/memstick/core/ms_block.c 	blk_mq_stop_hw_queues(msb->queue);
msb              2047 drivers/memstick/core/ms_block.c 	spin_lock_irqsave(&msb->q_lock, flags);
msb              2048 drivers/memstick/core/ms_block.c 	msb->io_queue_stopped = true;
msb              2049 drivers/memstick/core/ms_block.c 	spin_unlock_irqrestore(&msb->q_lock, flags);
msb              2051 drivers/memstick/core/ms_block.c 	del_timer_sync(&msb->cache_flush_timer);
msb              2052 drivers/memstick/core/ms_block.c 	flush_workqueue(msb->io_queue);
msb              2054 drivers/memstick/core/ms_block.c 	spin_lock_irqsave(&msb->q_lock, flags);
msb              2055 drivers/memstick/core/ms_block.c 	if (msb->req) {
msb              2056 drivers/memstick/core/ms_block.c 		blk_mq_requeue_request(msb->req, false);
msb              2057 drivers/memstick/core/ms_block.c 		msb->req = NULL;
msb              2059 drivers/memstick/core/ms_block.c 	spin_unlock_irqrestore(&msb->q_lock, flags);
msb              2064 drivers/memstick/core/ms_block.c 	struct msb_data *msb = memstick_get_drvdata(card);
msb              2069 drivers/memstick/core/ms_block.c 	msb_invalidate_reg_window(msb);
msb              2071 drivers/memstick/core/ms_block.c 	spin_lock_irqsave(&msb->q_lock, flags);
msb              2072 drivers/memstick/core/ms_block.c 	if (!msb->io_queue_stopped || msb->card_dead) {
msb              2073 drivers/memstick/core/ms_block.c 		spin_unlock_irqrestore(&msb->q_lock, flags);
msb              2076 drivers/memstick/core/ms_block.c 	spin_unlock_irqrestore(&msb->q_lock, flags);
msb              2079 drivers/memstick/core/ms_block.c 	msb->need_flush_cache = true;
msb              2080 drivers/memstick/core/ms_block.c 	msb->io_queue_stopped = false;
msb              2082 drivers/memstick/core/ms_block.c 	blk_mq_start_hw_queues(msb->queue);
msb              2084 drivers/memstick/core/ms_block.c 	queue_work(msb->io_queue, &msb->io_work);
msb              2102 drivers/memstick/core/ms_block.c 	struct msb_data *msb = memstick_get_drvdata(card);
msb              2107 drivers/memstick/core/ms_block.c 	msb->disk_id = idr_alloc(&msb_disk_idr, card, 0, 256, GFP_KERNEL);
msb              2110 drivers/memstick/core/ms_block.c 	if (msb->disk_id  < 0)
msb              2111 drivers/memstick/core/ms_block.c 		return msb->disk_id;
msb              2113 drivers/memstick/core/ms_block.c 	msb->disk = alloc_disk(0);
msb              2114 drivers/memstick/core/ms_block.c 	if (!msb->disk) {
msb              2119 drivers/memstick/core/ms_block.c 	msb->queue = blk_mq_init_sq_queue(&msb->tag_set, &msb_mq_ops, 2,
msb              2121 drivers/memstick/core/ms_block.c 	if (IS_ERR(msb->queue)) {
msb              2122 drivers/memstick/core/ms_block.c 		rc = PTR_ERR(msb->queue);
msb              2123 drivers/memstick/core/ms_block.c 		msb->queue = NULL;
msb              2127 drivers/memstick/core/ms_block.c 	msb->queue->queuedata = card;
msb              2129 drivers/memstick/core/ms_block.c 	blk_queue_max_hw_sectors(msb->queue, MS_BLOCK_MAX_PAGES);
msb              2130 drivers/memstick/core/ms_block.c 	blk_queue_max_segments(msb->queue, MS_BLOCK_MAX_SEGS);
msb              2131 drivers/memstick/core/ms_block.c 	blk_queue_max_segment_size(msb->queue,
msb              2132 drivers/memstick/core/ms_block.c 				   MS_BLOCK_MAX_PAGES * msb->page_size);
msb              2133 drivers/memstick/core/ms_block.c 	blk_queue_logical_block_size(msb->queue, msb->page_size);
msb              2135 drivers/memstick/core/ms_block.c 	sprintf(msb->disk->disk_name, "msblk%d", msb->disk_id);
msb              2136 drivers/memstick/core/ms_block.c 	msb->disk->fops = &msb_bdops;
msb              2137 drivers/memstick/core/ms_block.c 	msb->disk->private_data = msb;
msb              2138 drivers/memstick/core/ms_block.c 	msb->disk->queue = msb->queue;
msb              2139 drivers/memstick/core/ms_block.c 	msb->disk->flags |= GENHD_FL_EXT_DEVT;
msb              2141 drivers/memstick/core/ms_block.c 	capacity = msb->pages_in_block * msb->logical_block_count;
msb              2142 drivers/memstick/core/ms_block.c 	capacity *= (msb->page_size / 512);
msb              2143 drivers/memstick/core/ms_block.c 	set_capacity(msb->disk, capacity);
msb              2146 drivers/memstick/core/ms_block.c 	msb->usage_count = 1;
msb              2147 drivers/memstick/core/ms_block.c 	msb->io_queue = alloc_ordered_workqueue("ms_block", WQ_MEM_RECLAIM);
msb              2148 drivers/memstick/core/ms_block.c 	INIT_WORK(&msb->io_work, msb_io_work);
msb              2149 drivers/memstick/core/ms_block.c 	sg_init_table(msb->prealloc_sg, MS_BLOCK_MAX_SEGS+1);
msb              2151 drivers/memstick/core/ms_block.c 	if (msb->read_only)
msb              2152 drivers/memstick/core/ms_block.c 		set_disk_ro(msb->disk, 1);
msb              2155 drivers/memstick/core/ms_block.c 	device_add_disk(&card->dev, msb->disk, NULL);
msb              2160 drivers/memstick/core/ms_block.c 	put_disk(msb->disk);
msb              2163 drivers/memstick/core/ms_block.c 	idr_remove(&msb_disk_idr, msb->disk_id);
msb              2170 drivers/memstick/core/ms_block.c 	struct msb_data *msb;
msb              2173 drivers/memstick/core/ms_block.c 	msb = kzalloc(sizeof(struct msb_data), GFP_KERNEL);
msb              2174 drivers/memstick/core/ms_block.c 	if (!msb)
msb              2176 drivers/memstick/core/ms_block.c 	memstick_set_drvdata(card, msb);
msb              2177 drivers/memstick/core/ms_block.c 	msb->card = card;
msb              2178 drivers/memstick/core/ms_block.c 	spin_lock_init(&msb->q_lock);
msb              2193 drivers/memstick/core/ms_block.c 	msb_data_clear(msb);
msb              2194 drivers/memstick/core/ms_block.c 	kfree(msb);
msb              2200 drivers/memstick/core/ms_block.c 	struct msb_data *msb = memstick_get_drvdata(card);
msb              2203 drivers/memstick/core/ms_block.c 	if (!msb->io_queue_stopped)
msb              2209 drivers/memstick/core/ms_block.c 	spin_lock_irqsave(&msb->q_lock, flags);
msb              2210 drivers/memstick/core/ms_block.c 	msb->card_dead = true;
msb              2211 drivers/memstick/core/ms_block.c 	spin_unlock_irqrestore(&msb->q_lock, flags);
msb              2212 drivers/memstick/core/ms_block.c 	blk_mq_start_hw_queues(msb->queue);
msb              2215 drivers/memstick/core/ms_block.c 	del_gendisk(msb->disk);
msb              2216 drivers/memstick/core/ms_block.c 	blk_cleanup_queue(msb->queue);
msb              2217 drivers/memstick/core/ms_block.c 	blk_mq_free_tag_set(&msb->tag_set);
msb              2218 drivers/memstick/core/ms_block.c 	msb->queue = NULL;
msb              2221 drivers/memstick/core/ms_block.c 	msb_data_clear(msb);
msb              2224 drivers/memstick/core/ms_block.c 	msb_disk_release(msb->disk);
msb              2238 drivers/memstick/core/ms_block.c 	struct msb_data *msb = memstick_get_drvdata(card);
msb              2243 drivers/memstick/core/ms_block.c 	msb->card_dead = true;
msb              2255 drivers/memstick/core/ms_block.c 	sg_init_table(msb->prealloc_sg, MS_BLOCK_MAX_SEGS+1);
msb              2260 drivers/memstick/core/ms_block.c 	if (msb->block_size != new_msb->block_size)
msb              2263 drivers/memstick/core/ms_block.c 	if (memcmp(msb->boot_page, new_msb->boot_page,
msb              2267 drivers/memstick/core/ms_block.c 	if (msb->logical_block_count != new_msb->logical_block_count ||
msb              2268 drivers/memstick/core/ms_block.c 		memcmp(msb->lba_to_pba_table, new_msb->lba_to_pba_table,
msb              2269 drivers/memstick/core/ms_block.c 						msb->logical_block_count))
msb              2272 drivers/memstick/core/ms_block.c 	if (msb->block_count != new_msb->block_count ||
msb              2273 drivers/memstick/core/ms_block.c 		memcmp(msb->used_blocks_bitmap, new_msb->used_blocks_bitmap,
msb              2274 drivers/memstick/core/ms_block.c 							msb->block_count / 8))
msb              2282 drivers/memstick/core/ms_block.c 	msb->card_dead = card_dead;
msb              2283 drivers/memstick/core/ms_block.c 	memstick_set_drvdata(card, msb);
msb               272 drivers/memstick/core/ms_block.h static int msb_reset(struct msb_data *msb, bool full);
msb               184 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = disk->private_data;
msb               189 drivers/memstick/core/mspro_block.c 	if (msb && msb->card) {
msb               190 drivers/memstick/core/mspro_block.c 		msb->usage_count++;
msb               191 drivers/memstick/core/mspro_block.c 		if ((mode & FMODE_WRITE) && msb->read_only)
msb               205 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = disk->private_data;
msb               210 drivers/memstick/core/mspro_block.c 	if (msb) {
msb               211 drivers/memstick/core/mspro_block.c 		if (msb->usage_count)
msb               212 drivers/memstick/core/mspro_block.c 			msb->usage_count--;
msb               214 drivers/memstick/core/mspro_block.c 		if (!msb->usage_count) {
msb               215 drivers/memstick/core/mspro_block.c 			kfree(msb);
msb               233 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = bdev->bd_disk->private_data;
msb               235 drivers/memstick/core/mspro_block.c 	geo->heads = msb->heads;
msb               236 drivers/memstick/core/mspro_block.c 	geo->sectors = msb->sectors_per_track;
msb               237 drivers/memstick/core/mspro_block.c 	geo->cylinders = msb->cylinders;
msb               524 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb               527 drivers/memstick/core/mspro_block.c 	card->next_request = msb->mrq_handler;
msb               546 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb               551 drivers/memstick/core/mspro_block.c 			msb->read_only = 1;
msb               553 drivers/memstick/core/mspro_block.c 			msb->read_only = 0;
msb               577 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb               587 drivers/memstick/core/mspro_block.c 		memstick_init_req(*mrq, MS_TPC_SET_CMD, &msb->transfer_cmd, 1);
msb               593 drivers/memstick/core/mspro_block.c 		if (msb->caps & MEMSTICK_CAP_AUTO_GET_INT)
msb               606 drivers/memstick/core/mspro_block.c 		if (msb->current_page
msb               607 drivers/memstick/core/mspro_block.c 		    == (msb->req_sg[msb->current_seg].length
msb               608 drivers/memstick/core/mspro_block.c 			/ msb->page_size)) {
msb               609 drivers/memstick/core/mspro_block.c 			msb->current_page = 0;
msb               610 drivers/memstick/core/mspro_block.c 			msb->current_seg++;
msb               612 drivers/memstick/core/mspro_block.c 			if (msb->current_seg == msb->seg_count) {
msb               631 drivers/memstick/core/mspro_block.c 		t_offset = msb->req_sg[msb->current_seg].offset;
msb               632 drivers/memstick/core/mspro_block.c 		t_offset += msb->current_page * msb->page_size;
msb               635 drivers/memstick/core/mspro_block.c 			    nth_page(sg_page(&(msb->req_sg[msb->current_seg])),
msb               637 drivers/memstick/core/mspro_block.c 			    msb->page_size, offset_in_page(t_offset));
msb               639 drivers/memstick/core/mspro_block.c 		memstick_init_req_sg(*mrq, msb->data_dir == READ
msb               647 drivers/memstick/core/mspro_block.c 		msb->current_page++;
msb               648 drivers/memstick/core/mspro_block.c 		if (msb->caps & MEMSTICK_CAP_AUTO_GET_INT) {
msb               673 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb               675 drivers/memstick/core/mspro_block.c 		.system = msb->system,
msb               676 drivers/memstick/core/mspro_block.c 		.data_count = cpu_to_be16((uint16_t)(length / msb->page_size)),
msb               682 drivers/memstick/core/mspro_block.c 	do_div(offset, msb->page_size);
msb               686 drivers/memstick/core/mspro_block.c 	msb->mrq_handler = h_mspro_block_transfer_data;
msb               695 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb               700 drivers/memstick/core/mspro_block.c 		msb->current_page = 0;
msb               701 drivers/memstick/core/mspro_block.c 		msb->current_seg = 0;
msb               702 drivers/memstick/core/mspro_block.c 		msb->seg_count = blk_rq_map_sg(msb->block_req->q,
msb               703 drivers/memstick/core/mspro_block.c 					       msb->block_req,
msb               704 drivers/memstick/core/mspro_block.c 					       msb->req_sg);
msb               706 drivers/memstick/core/mspro_block.c 		if (!msb->seg_count) {
msb               707 drivers/memstick/core/mspro_block.c 			unsigned int bytes = blk_rq_cur_bytes(msb->block_req);
msb               710 drivers/memstick/core/mspro_block.c 			chunk = blk_update_request(msb->block_req,
msb               715 drivers/memstick/core/mspro_block.c 			__blk_mq_end_request(msb->block_req,
msb               717 drivers/memstick/core/mspro_block.c 			msb->block_req = NULL;
msb               721 drivers/memstick/core/mspro_block.c 		t_off = blk_rq_pos(msb->block_req);
msb               723 drivers/memstick/core/mspro_block.c 		count = blk_rq_bytes(msb->block_req);
msb               725 drivers/memstick/core/mspro_block.c 		msb->setup_transfer(card, t_off, count);
msb               727 drivers/memstick/core/mspro_block.c 		msb->data_dir = rq_data_dir(msb->block_req);
msb               728 drivers/memstick/core/mspro_block.c 		msb->transfer_cmd = msb->data_dir == READ
msb               739 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb               745 drivers/memstick/core/mspro_block.c 	spin_lock_irqsave(&msb->q_lock, flags);
msb               746 drivers/memstick/core/mspro_block.c 	dev_dbg(&card->dev, "complete %d, %d\n", msb->block_req ? 1 : 0,
msb               749 drivers/memstick/core/mspro_block.c 	if (msb->block_req) {
msb               755 drivers/memstick/core/mspro_block.c 			if (msb->data_dir == READ) {
msb               756 drivers/memstick/core/mspro_block.c 				for (cnt = 0; cnt < msb->current_seg; cnt++) {
msb               757 drivers/memstick/core/mspro_block.c 					t_len += msb->req_sg[cnt].length
msb               758 drivers/memstick/core/mspro_block.c 						 / msb->page_size;
msb               760 drivers/memstick/core/mspro_block.c 					if (msb->current_page)
msb               761 drivers/memstick/core/mspro_block.c 						t_len += msb->current_page - 1;
msb               763 drivers/memstick/core/mspro_block.c 					t_len *= msb->page_size;
msb               767 drivers/memstick/core/mspro_block.c 			t_len = blk_rq_bytes(msb->block_req);
msb               772 drivers/memstick/core/mspro_block.c 			t_len = blk_rq_cur_bytes(msb->block_req);
msb               774 drivers/memstick/core/mspro_block.c 		chunk = blk_update_request(msb->block_req,
msb               781 drivers/memstick/core/mspro_block.c 			__blk_mq_end_request(msb->block_req,
msb               783 drivers/memstick/core/mspro_block.c 			msb->block_req = NULL;
msb               793 drivers/memstick/core/mspro_block.c 	spin_unlock_irqrestore(&msb->q_lock, flags);
msb               799 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb               804 drivers/memstick/core/mspro_block.c 		spin_lock_irqsave(&msb->q_lock, flags);
msb               805 drivers/memstick/core/mspro_block.c 		if (!msb->block_req) {
msb               806 drivers/memstick/core/mspro_block.c 			blk_mq_stop_hw_queues(msb->queue);
msb               809 drivers/memstick/core/mspro_block.c 		spin_unlock_irqrestore(&msb->q_lock, flags);
msb               820 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb               822 drivers/memstick/core/mspro_block.c 	blk_mq_start_hw_queues(msb->queue);
msb               829 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb               831 drivers/memstick/core/mspro_block.c 	spin_lock_irq(&msb->q_lock);
msb               833 drivers/memstick/core/mspro_block.c 	if (msb->block_req) {
msb               834 drivers/memstick/core/mspro_block.c 		spin_unlock_irq(&msb->q_lock);
msb               838 drivers/memstick/core/mspro_block.c 	if (msb->eject) {
msb               839 drivers/memstick/core/mspro_block.c 		spin_unlock_irq(&msb->q_lock);
msb               844 drivers/memstick/core/mspro_block.c 	msb->block_req = bd->rq;
msb               848 drivers/memstick/core/mspro_block.c 		msb->block_req = NULL;
msb               850 drivers/memstick/core/mspro_block.c 	spin_unlock_irq(&msb->q_lock);
msb               858 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb               861 drivers/memstick/core/mspro_block.c 	msb->mrq_handler = h_mspro_block_wait_for_ced;
msb               872 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb               881 drivers/memstick/core/mspro_block.c 	msb->mrq_handler = h_mspro_block_default;
msb               892 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb               896 drivers/memstick/core/mspro_block.c 	if (msb->caps & MEMSTICK_CAP_PAR4)
msb               908 drivers/memstick/core/mspro_block.c 	msb->system = MEMSTICK_SYS_PAR4;
msb               913 drivers/memstick/core/mspro_block.c 	if (msb->caps & MEMSTICK_CAP_PAR8) {
msb               917 drivers/memstick/core/mspro_block.c 			msb->system = MEMSTICK_SYS_PAR8;
msb               930 drivers/memstick/core/mspro_block.c 	msb->mrq_handler = h_mspro_block_default;
msb               940 drivers/memstick/core/mspro_block.c 		msb->system = MEMSTICK_SYS_SERIAL;
msb               948 drivers/memstick/core/mspro_block.c 			rc = mspro_block_set_interface(card, msb->system);
msb               956 drivers/memstick/core/mspro_block.c 			if (msb->caps & MEMSTICK_CAP_PAR8) {
msb               957 drivers/memstick/core/mspro_block.c 				msb->caps &= ~MEMSTICK_CAP_PAR8;
msb               971 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb               981 drivers/memstick/core/mspro_block.c 	unsigned int addr, attr_offset = 0, attr_len = msb->page_size;
msb               983 drivers/memstick/core/mspro_block.c 	attr = kmalloc(msb->page_size, GFP_KERNEL);
msb               987 drivers/memstick/core/mspro_block.c 	sg_init_one(&msb->req_sg[0], attr, msb->page_size);
msb               988 drivers/memstick/core/mspro_block.c 	msb->seg_count = 1;
msb               989 drivers/memstick/core/mspro_block.c 	msb->current_seg = 0;
msb               990 drivers/memstick/core/mspro_block.c 	msb->current_page = 0;
msb               991 drivers/memstick/core/mspro_block.c 	msb->data_dir = READ;
msb               992 drivers/memstick/core/mspro_block.c 	msb->transfer_cmd = MSPRO_CMD_READ_ATRB;
msb               994 drivers/memstick/core/mspro_block.c 	msb->setup_transfer(card, attr_offset, attr_len);
msb              1017 drivers/memstick/core/mspro_block.c 	msb->attr_group.attrs = kcalloc(attr_count + 1,
msb              1018 drivers/memstick/core/mspro_block.c 					sizeof(*msb->attr_group.attrs),
msb              1020 drivers/memstick/core/mspro_block.c 	if (!msb->attr_group.attrs) {
msb              1024 drivers/memstick/core/mspro_block.c 	msb->attr_group.name = "media_attributes";
msb              1039 drivers/memstick/core/mspro_block.c 		msb->attr_group.attrs[cnt] = &s_attr->dev_attr.attr;
msb              1067 drivers/memstick/core/mspro_block.c 		if (((addr / msb->page_size) == (attr_offset / msb->page_size))
msb              1068 drivers/memstick/core/mspro_block.c 		    && (((addr + s_attr->size - 1) / msb->page_size)
msb              1069 drivers/memstick/core/mspro_block.c 			== (attr_offset / msb->page_size))) {
msb              1070 drivers/memstick/core/mspro_block.c 			memcpy(s_attr->data, buffer + addr % msb->page_size,
msb              1075 drivers/memstick/core/mspro_block.c 		attr_offset = (addr / msb->page_size) * msb->page_size;
msb              1079 drivers/memstick/core/mspro_block.c 			attr_len = (((addr + s_attr->size) / msb->page_size)
msb              1080 drivers/memstick/core/mspro_block.c 				    + 1 ) * msb->page_size - attr_offset;
msb              1088 drivers/memstick/core/mspro_block.c 		sg_init_one(&msb->req_sg[0], buffer, attr_len);
msb              1089 drivers/memstick/core/mspro_block.c 		msb->seg_count = 1;
msb              1090 drivers/memstick/core/mspro_block.c 		msb->current_seg = 0;
msb              1091 drivers/memstick/core/mspro_block.c 		msb->current_page = 0;
msb              1092 drivers/memstick/core/mspro_block.c 		msb->data_dir = READ;
msb              1093 drivers/memstick/core/mspro_block.c 		msb->transfer_cmd = MSPRO_CMD_READ_ATRB;
msb              1098 drivers/memstick/core/mspro_block.c 		msb->setup_transfer(card, attr_offset, attr_len);
msb              1106 drivers/memstick/core/mspro_block.c 		memcpy(s_attr->data, buffer + addr % msb->page_size,
msb              1120 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb              1124 drivers/memstick/core/mspro_block.c 	msb->system = MEMSTICK_SYS_SERIAL;
msb              1125 drivers/memstick/core/mspro_block.c 	msb->setup_transfer = h_mspro_block_setup_cmd;
msb              1135 drivers/memstick/core/mspro_block.c 	msb->caps = host->caps;
msb              1147 drivers/memstick/core/mspro_block.c 	if (msb->system != MEMSTICK_SYS_SERIAL)
msb              1148 drivers/memstick/core/mspro_block.c 		msb->caps |= MEMSTICK_CAP_AUTO_GET_INT;
msb              1151 drivers/memstick/core/mspro_block.c 	msb->mrq_handler = h_mspro_block_get_ro;
msb              1159 drivers/memstick/core/mspro_block.c 	dev_dbg(&card->dev, "card r/w status %d\n", msb->read_only ? 0 : 1);
msb              1161 drivers/memstick/core/mspro_block.c 	msb->page_size = 512;
msb              1177 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb              1184 drivers/memstick/core/mspro_block.c 	for (rc = 0; msb->attr_group.attrs[rc]; ++rc) {
msb              1185 drivers/memstick/core/mspro_block.c 		s_attr = mspro_from_sysfs_attr(msb->attr_group.attrs[rc]);
msb              1196 drivers/memstick/core/mspro_block.c 	msb->cylinders = be16_to_cpu(dev_info->cylinders);
msb              1197 drivers/memstick/core/mspro_block.c 	msb->heads = be16_to_cpu(dev_info->heads);
msb              1198 drivers/memstick/core/mspro_block.c 	msb->sectors_per_track = be16_to_cpu(dev_info->sectors_per_track);
msb              1200 drivers/memstick/core/mspro_block.c 	msb->page_size = be16_to_cpu(sys_info->unit_size);
msb              1208 drivers/memstick/core/mspro_block.c 	msb->disk = alloc_disk(1 << MSPRO_BLOCK_PART_SHIFT);
msb              1209 drivers/memstick/core/mspro_block.c 	if (!msb->disk) {
msb              1214 drivers/memstick/core/mspro_block.c 	msb->queue = blk_mq_init_sq_queue(&msb->tag_set, &mspro_mq_ops, 2,
msb              1216 drivers/memstick/core/mspro_block.c 	if (IS_ERR(msb->queue)) {
msb              1217 drivers/memstick/core/mspro_block.c 		rc = PTR_ERR(msb->queue);
msb              1218 drivers/memstick/core/mspro_block.c 		msb->queue = NULL;
msb              1222 drivers/memstick/core/mspro_block.c 	msb->queue->queuedata = card;
msb              1224 drivers/memstick/core/mspro_block.c 	blk_queue_max_hw_sectors(msb->queue, MSPRO_BLOCK_MAX_PAGES);
msb              1225 drivers/memstick/core/mspro_block.c 	blk_queue_max_segments(msb->queue, MSPRO_BLOCK_MAX_SEGS);
msb              1226 drivers/memstick/core/mspro_block.c 	blk_queue_max_segment_size(msb->queue,
msb              1227 drivers/memstick/core/mspro_block.c 				   MSPRO_BLOCK_MAX_PAGES * msb->page_size);
msb              1229 drivers/memstick/core/mspro_block.c 	msb->disk->major = major;
msb              1230 drivers/memstick/core/mspro_block.c 	msb->disk->first_minor = disk_id << MSPRO_BLOCK_PART_SHIFT;
msb              1231 drivers/memstick/core/mspro_block.c 	msb->disk->fops = &ms_block_bdops;
msb              1232 drivers/memstick/core/mspro_block.c 	msb->usage_count = 1;
msb              1233 drivers/memstick/core/mspro_block.c 	msb->disk->private_data = msb;
msb              1234 drivers/memstick/core/mspro_block.c 	msb->disk->queue = msb->queue;
msb              1236 drivers/memstick/core/mspro_block.c 	sprintf(msb->disk->disk_name, "mspblk%d", disk_id);
msb              1238 drivers/memstick/core/mspro_block.c 	blk_queue_logical_block_size(msb->queue, msb->page_size);
msb              1242 drivers/memstick/core/mspro_block.c 	capacity *= msb->page_size >> 9;
msb              1243 drivers/memstick/core/mspro_block.c 	set_capacity(msb->disk, capacity);
msb              1246 drivers/memstick/core/mspro_block.c 	device_add_disk(&card->dev, msb->disk, NULL);
msb              1247 drivers/memstick/core/mspro_block.c 	msb->active = 1;
msb              1251 drivers/memstick/core/mspro_block.c 	put_disk(msb->disk);
msb              1259 drivers/memstick/core/mspro_block.c static void mspro_block_data_clear(struct mspro_block_data *msb)
msb              1264 drivers/memstick/core/mspro_block.c 	if (msb->attr_group.attrs) {
msb              1265 drivers/memstick/core/mspro_block.c 		for (cnt = 0; msb->attr_group.attrs[cnt]; ++cnt) {
msb              1266 drivers/memstick/core/mspro_block.c 			s_attr = mspro_from_sysfs_attr(msb->attr_group
msb              1271 drivers/memstick/core/mspro_block.c 		kfree(msb->attr_group.attrs);
msb              1274 drivers/memstick/core/mspro_block.c 	msb->card = NULL;
msb              1279 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb              1281 drivers/memstick/core/mspro_block.c 	return (msb->active == 1);
msb              1286 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb;
msb              1289 drivers/memstick/core/mspro_block.c 	msb = kzalloc(sizeof(struct mspro_block_data), GFP_KERNEL);
msb              1290 drivers/memstick/core/mspro_block.c 	if (!msb)
msb              1292 drivers/memstick/core/mspro_block.c 	memstick_set_drvdata(card, msb);
msb              1293 drivers/memstick/core/mspro_block.c 	msb->card = card;
msb              1294 drivers/memstick/core/mspro_block.c 	spin_lock_init(&msb->q_lock);
msb              1301 drivers/memstick/core/mspro_block.c 	rc = sysfs_create_group(&card->dev.kobj, &msb->attr_group);
msb              1313 drivers/memstick/core/mspro_block.c 	sysfs_remove_group(&card->dev.kobj, &msb->attr_group);
msb              1316 drivers/memstick/core/mspro_block.c 	mspro_block_data_clear(msb);
msb              1317 drivers/memstick/core/mspro_block.c 	kfree(msb);
msb              1323 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb              1326 drivers/memstick/core/mspro_block.c 	spin_lock_irqsave(&msb->q_lock, flags);
msb              1327 drivers/memstick/core/mspro_block.c 	msb->eject = 1;
msb              1328 drivers/memstick/core/mspro_block.c 	spin_unlock_irqrestore(&msb->q_lock, flags);
msb              1329 drivers/memstick/core/mspro_block.c 	blk_mq_start_hw_queues(msb->queue);
msb              1331 drivers/memstick/core/mspro_block.c 	del_gendisk(msb->disk);
msb              1334 drivers/memstick/core/mspro_block.c 	blk_cleanup_queue(msb->queue);
msb              1335 drivers/memstick/core/mspro_block.c 	blk_mq_free_tag_set(&msb->tag_set);
msb              1336 drivers/memstick/core/mspro_block.c 	msb->queue = NULL;
msb              1338 drivers/memstick/core/mspro_block.c 	sysfs_remove_group(&card->dev.kobj, &msb->attr_group);
msb              1341 drivers/memstick/core/mspro_block.c 	mspro_block_data_clear(msb);
msb              1344 drivers/memstick/core/mspro_block.c 	mspro_block_disk_release(msb->disk);
msb              1352 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb              1355 drivers/memstick/core/mspro_block.c 	blk_mq_stop_hw_queues(msb->queue);
msb              1357 drivers/memstick/core/mspro_block.c 	spin_lock_irqsave(&msb->q_lock, flags);
msb              1358 drivers/memstick/core/mspro_block.c 	msb->active = 0;
msb              1359 drivers/memstick/core/mspro_block.c 	spin_unlock_irqrestore(&msb->q_lock, flags);
msb              1366 drivers/memstick/core/mspro_block.c 	struct mspro_block_data *msb = memstick_get_drvdata(card);
msb              1389 drivers/memstick/core/mspro_block.c 		      && msb->attr_group.attrs[cnt]; ++cnt) {
msb              1391 drivers/memstick/core/mspro_block.c 		r_attr = mspro_from_sysfs_attr(msb->attr_group.attrs[cnt]);
msb              1398 drivers/memstick/core/mspro_block.c 			msb->active = 1;
msb              1404 drivers/memstick/core/mspro_block.c 	memstick_set_drvdata(card, msb);
msb              1412 drivers/memstick/core/mspro_block.c 	blk_mq_start_hw_queues(msb->queue);
msb                51 drivers/mfd/atmel-smc.c 	unsigned int msb, lsb;
msb                54 drivers/mfd/atmel-smc.c 	msb = ncycles / msbfactor;
msb                59 drivers/mfd/atmel-smc.c 		msb++;
msb                67 drivers/mfd/atmel-smc.c 	if (msb > msbmask) {
msb                68 drivers/mfd/atmel-smc.c 		msb = msbmask;
msb                73 drivers/mfd/atmel-smc.c 	*encodedval = (msb << msbpos) | lsb;
msb               565 drivers/mfd/rk808.c 	int pm_off = 0, msb, lsb;
msb               584 drivers/mfd/rk808.c 	msb = i2c_smbus_read_byte_data(client, pmic_id_msb);
msb               585 drivers/mfd/rk808.c 	if (msb < 0) {
msb               588 drivers/mfd/rk808.c 		return msb;
msb               598 drivers/mfd/rk808.c 	rk808->variant = ((msb << 8) | lsb) & RK8XX_ID_MSK;
msb               441 drivers/mfd/si476x-cmd.c 		msb(property),
msb               443 drivers/mfd/si476x-cmd.c 		msb(value),
msb               468 drivers/mfd/si476x-cmd.c 		msb(property),
msb               949 drivers/mfd/si476x-cmd.c 	report->rds[V4L2_RDS_BLOCK_A].msb = resp[8];
msb               953 drivers/mfd/si476x-cmd.c 	report->rds[V4L2_RDS_BLOCK_B].msb = resp[10];
msb               957 drivers/mfd/si476x-cmd.c 	report->rds[V4L2_RDS_BLOCK_C].msb = resp[12];
msb               961 drivers/mfd/si476x-cmd.c 	report->rds[V4L2_RDS_BLOCK_D].msb = resp[14];
msb              1143 drivers/mfd/si476x-cmd.c 		msb(am_freq),
msb              1159 drivers/mfd/si476x-cmd.c 		msb(am_freq),
msb              1345 drivers/mfd/si476x-cmd.c 		msb(tuneargs->freq),
msb              1347 drivers/mfd/si476x-cmd.c 		msb(tuneargs->antcap),
msb              1363 drivers/mfd/si476x-cmd.c 		msb(tuneargs->freq),
msb                46 drivers/mfd/stw481x.c 	u8 msb = (reg >> 3) & 0x03;
msb                52 drivers/mfd/stw481x.c 	ret = regmap_write(stw481x->map, STW_PCTL_REG_HI, msb);
msb               158 drivers/misc/isl29003.c 	int lsb, msb, range, bitdepth;
msb               168 drivers/misc/isl29003.c 	msb = i2c_smbus_read_byte_data(client, ISL29003_REG_MSB_SENSOR);
msb               171 drivers/misc/isl29003.c 	if (msb < 0)
msb               172 drivers/misc/isl29003.c 		return msb;
msb               176 drivers/misc/isl29003.c 	return (((msb << 8) | lsb) * gain_range[range]) >> bitdepth;
msb                93 drivers/mux/mmio.c 		field.msb = fls(mask) - 1;
msb                96 drivers/mux/mmio.c 		if (mask != GENMASK(field.msb, field.lsb)) {
msb               110 drivers/mux/mmio.c 		bits = 1 + field.msb - field.lsb;
msb               186 drivers/net/dsa/b53/b53_serdes.c 	u16 id0, msb, lsb;
msb               192 drivers/net/dsa/b53/b53_serdes.c 	msb = b53_serdes_read(dev, lane, B53_SERDES_MII_REG(MII_PHYSID1),
msb               206 drivers/net/dsa/b53/b53_serdes.c 		 (u32)msb << 16 | lsb);
msb               854 drivers/net/ethernet/altera/altera_tse_main.c 	u32 msb;
msb               857 drivers/net/ethernet/altera/altera_tse_main.c 	msb = (addr[3] << 24) | (addr[2] << 16) | (addr[1] << 8) | addr[0];
msb               861 drivers/net/ethernet/altera/altera_tse_main.c 	csrwr32(msb, priv->mac_dev, tse_csroffs(mac_addr_0));
msb                33 drivers/net/ethernet/brocade/bna/bna.h 	(_bna_dma_addr)->msb = ((struct bna_dma_addr *)&tmp_addr)->msb; \
msb                43 drivers/net/ethernet/brocade/bna/bna.h 	(_addr) = ((((u64)ntohl((_bna_dma_addr)->msb))) << 32)		\
msb              1853 drivers/net/ethernet/brocade/bna/bna_enet.c 	stats_req->host_buffer.a32.addr_hi = bna->stats.hw_stats_dma.msb;
msb              1974 drivers/net/ethernet/brocade/bna/bna_enet.c 	bna->stats.hw_stats_dma.msb =
msb              1975 drivers/net/ethernet/brocade/bna/bna_enet.c 		res_info[BNA_RES_MEM_T_STATS].res_u.mem_info.mdl[0].dma.msb;
msb               346 drivers/net/ethernet/brocade/bna/bna_hw_defs.h 	u32		msb;
msb              1294 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 	(bfi_q)->pg_tbl.a32.addr_hi = (bna_qpt)->hw_qpt_ptr.msb;	\
msb              1296 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 	(bfi_q)->first_entry.a32.addr_hi = cur_q_addr.msb;		\
msb              1670 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 			rxp->cq.ib.ib_seg_host_addr.msb;
msb              1867 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 	rxq->qpt.hw_qpt_ptr.msb = qpt_mem->dma.msb;
msb              1885 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		((struct bna_dma_addr *)rxq->qpt.kv_qpt_ptr)[i].msb =
msb              1886 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 			bna_dma.msb;
msb              1905 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 	rxp->cq.qpt.hw_qpt_ptr.msb = qpt_mem->dma.msb;
msb              1923 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		((struct bna_dma_addr *)rxp->cq.qpt.kv_qpt_ptr)[i].msb =
msb              1924 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 			bna_dma.msb;
msb              2362 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		rxp->cq.ib.ib_seg_host_addr.msb =
msb              2363 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		res_info[BNA_RX_RES_MEM_T_IBIDX].res_u.mem_info.mdl[i].dma.msb;
msb              3107 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 			txq->ib.ib_seg_host_addr.msb;
msb              3172 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 	txq->qpt.hw_qpt_ptr.msb = qpt_mem->dma.msb;
msb              3190 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		((struct bna_dma_addr *)txq->qpt.kv_qpt_ptr)[i].msb =
msb              3191 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 			bna_dma.msb;
msb              3450 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		txq->ib.ib_seg_host_addr.msb =
msb              3451 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		res_info[BNA_TX_RES_MEM_T_IBIDX].res_u.mem_info.mdl[i].dma.msb;
msb              5077 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c 		u32 msb = 0;
msb              5081 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c 			msb++;
msb              5086 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c 		IXGBE_WRITE_REG(hw, IXGBE_RQTC, msb * 0x11111111);
msb                79 drivers/net/ethernet/mscc/ocelot_io.c 		regfield.msb = regfields[i].msb;
msb              1445 drivers/net/ethernet/qlogic/qed/qed_l2.c 	u8 msb = 0, current_byte = 0;
msb              1454 drivers/net/ethernet/qlogic/qed/qed_l2.c 			msb = (u8)(crc32_result >> 31);
msb              1456 drivers/net/ethernet/qlogic/qed/qed_l2.c 			if (msb != (0x1 & (current_byte >> bit))) {
msb                84 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c 	.msb = 31,
msb                91 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c 	.msb = 31,
msb               187 drivers/net/plip/plip.c 			unsigned char msb;
msb               189 drivers/net/plip/plip.c 			unsigned char msb;
msb               622 drivers/net/plip/plip.c 				 &rcv->nibble, &rcv->length.b.msb))
msb               821 drivers/net/plip/plip.c 			      &snd->nibble, snd->length.b.msb))
msb              3842 drivers/net/usb/lan78xx.c 	u16 bit, crc, msb;
msb              3849 drivers/net/usb/lan78xx.c 			msb = crc >> 15;
msb              3852 drivers/net/usb/lan78xx.c 			if (msb ^ (u16)(data & 1)) {
msb               211 drivers/net/wireless/ath/ath10k/hw.c 	.msb	= 0x00000010,
msb               217 drivers/net/wireless/ath/ath10k/hw.c 	.msb	= 0x00000012,
msb               223 drivers/net/wireless/ath/ath10k/hw.c 	.msb	= 0x00000000,
msb               265 drivers/net/wireless/ath/ath10k/hw.c 	.msb	= 0x00000000,
msb               271 drivers/net/wireless/ath/ath10k/hw.c 	.msb	= 0x0000000f,
msb               290 drivers/net/wireless/ath/ath10k/hw.c 	.msb	= 0x0000000f,
msb               343 drivers/net/wireless/ath/ath10k/hw.c 	.msb	= 0x00000010,
msb               349 drivers/net/wireless/ath/ath10k/hw.c 	.msb	= 0x00000011,
msb               355 drivers/net/wireless/ath/ath10k/hw.c 	.msb	= 0x0000000f,
msb               374 drivers/net/wireless/ath/ath10k/hw.c 	.msb	= 0x00000003,
msb               380 drivers/net/wireless/ath/ath10k/hw.c 	.msb		= 0x00000000,
msb               387 drivers/net/wireless/ath/ath10k/hw.c 	.msb	= 0x00000000,
msb               419 drivers/net/wireless/ath/ath10k/hw.c 	.msb    = 0x0000001f,
msb               425 drivers/net/wireless/ath/ath10k/hw.c 	.msb	= 0x0000000f,
msb               444 drivers/net/wireless/ath/ath10k/hw.c 	.msb	= 0x0000000f,
msb               916 drivers/net/wireless/ath/ath10k/hw.c static void ath10k_hw_map_target_mem(struct ath10k *ar, u32 msb)
msb               920 drivers/net/wireless/ath/ath10k/hw.c 	ath10k_hif_write32(ar, address, msb);
msb               286 drivers/net/wireless/ath/ath10k/hw.h 	u32 msb;
msb               305 drivers/net/wireless/ath/ath10k/hw.h 	u32 msb;
msb              2505 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c 	u8 msb, secondmsb, i;
msb              2511 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c 		msb = fls(tmp);
msb              2512 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c 		if (msb)
msb              2513 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c 			secondmsb = (u8) ((tmp >> (--msb - 1)) & 1);
msb              2514 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c 		p_cmplx_pwr_dB[i] = (s8) (3 * msb + 2 * secondmsb);
msb                42 drivers/phy/socionext/phy-uniphier-usb3hs.c #define PHY_F(regno, msb, lsb) { (regno), (msb), (lsb) }
msb                52 drivers/phy/socionext/phy-uniphier-usb3hs.c 		int msb;
msb               176 drivers/phy/socionext/phy-uniphier-usb3hs.c 	u32 field_mask = GENMASK(p->field.msb, p->field.lsb);
msb                30 drivers/phy/socionext/phy-uniphier-usb3ss.c #define PHY_F(regno, msb, lsb) { (regno), (msb), (lsb) }
msb                46 drivers/phy/socionext/phy-uniphier-usb3ss.c 		int msb;
msb                80 drivers/phy/socionext/phy-uniphier-usb3ss.c 	u8 field_mask = GENMASK(p->field.msb, p->field.lsb);
msb               250 drivers/phy/ti/phy-gmii-sel.c 			field->reg, field->msb, field->lsb);
msb               399 drivers/pinctrl/pinctrl-ocelot.c #define REG_ALT(msb, info, p) (OCELOT_GPIO_ALT0 * (info)->stride + 4 * ((msb) + ((info)->stride * ((p) / 32))))
msb              1121 drivers/pinctrl/pinctrl-st.c 					    int data, int lsb, int msb)
msb              1123 drivers/pinctrl/pinctrl-st.c 	struct reg_field reg = REG_FIELD((data + bank) * 4, lsb, msb);
msb              1141 drivers/pinctrl/pinctrl-st.c 	int msb = lsb + ST_GPIO_PINS_PER_BANK - 1;
msb              1147 drivers/pinctrl/pinctrl-st.c 	pc->oe = st_pc_get_value(dev, regmap, bank/4, data->oe, lsb, msb);
msb              1148 drivers/pinctrl/pinctrl-st.c 	pc->pu = st_pc_get_value(dev, regmap, bank/4, data->pu, lsb, msb);
msb              1149 drivers/pinctrl/pinctrl-st.c 	pc->od = st_pc_get_value(dev, regmap, bank/4, data->od, lsb, msb);
msb              1283 drivers/pinctrl/stm32/pinctrl-stm32.c 		mux.msb = mux.lsb + mask_width - 1;
msb              1286 drivers/pinctrl/stm32/pinctrl-stm32.c 			i, mux.reg, mux.lsb, mux.msb);
msb               144 drivers/pnp/isapnp/core.c 	unsigned char code = 0x6a, msb;
msb               154 drivers/pnp/isapnp/core.c 		msb = ((code & 0x01) ^ ((code & 0x02) >> 1)) << 7;
msb               155 drivers/pnp/isapnp/core.c 		code = (code >> 1) | msb;
msb                18 drivers/power/supply/rt5033_battery.c 	u32 msb;
msb                20 drivers/power/supply/rt5033_battery.c 	regmap_read(battery->regmap, RT5033_FUEL_REG_SOC_H, &msb);
msb                22 drivers/power/supply/rt5033_battery.c 	return msb;
msb                41 drivers/power/supply/rt5033_battery.c 	u32 msb, lsb;
msb                60 drivers/power/supply/rt5033_battery.c 	regmap_read(battery->regmap, regh, &msb);
msb                63 drivers/power/supply/rt5033_battery.c 	ret = ((msb << 4) + (lsb >> 4)) * 1250 / 1000;
msb               166 drivers/power/supply/rt9455_charger.c #define GET_MASK(fid)	(BIT(rt9455_reg_fields[fid].msb + 1) - \
msb                47 drivers/rtc/rtc-snvs.c 	u32 msb, lsb;
msb                49 drivers/rtc/rtc-snvs.c 	regmap_read(data->regmap, data->offset + SNVS_LPSRTCMR, &msb);
msb                51 drivers/rtc/rtc-snvs.c 	return (u64)msb << 32 | lsb;
msb                54 drivers/rtc/rtc-st-lpc.c 				unsigned long msb, unsigned long  lsb)
msb                62 drivers/rtc/rtc-st-lpc.c 	writel_relaxed(msb, rtc->ioaddr + LPC_LPA_MSB_OFF);
msb               128 drivers/s390/block/scm_blk.c 	struct msb *msb;
msb               133 drivers/s390/block/scm_blk.c 		msb = &scmrq->aob->msb[i];
msb               134 drivers/s390/block/scm_blk.c 		aidaw = msb->data_addr;
msb               136 drivers/s390/block/scm_blk.c 		if ((msb->flags & MSB_FLAG_IDA) && aidaw &&
msb               184 drivers/s390/block/scm_blk.c 	struct msb *msb = &scmrq->aob->msb[pos];
msb               194 drivers/s390/block/scm_blk.c 	msb->bs = MSB_BS_4K;
msb               196 drivers/s390/block/scm_blk.c 	msb->scm_addr = scmdev->address + ((u64) blk_rq_pos(req) << 9);
msb               197 drivers/s390/block/scm_blk.c 	msb->oc = (rq_data_dir(req) == READ) ? MSB_OC_READ : MSB_OC_WRITE;
msb               198 drivers/s390/block/scm_blk.c 	msb->flags |= MSB_FLAG_IDA;
msb               199 drivers/s390/block/scm_blk.c 	msb->data_addr = (u64) aidaw;
msb               203 drivers/s390/block/scm_blk.c 		msb->blk_count += bv.bv_len >> 12;
msb               234 drivers/s390/block/scm_blk.c 	scmrq->next_aidaw = (void *) &aob->msb[nr_requests_per_io];
msb              1267 drivers/scsi/scsi_transport_spi.c static void print_ptr(const unsigned char *msg, int msb, const char *desc)
msb              1269 drivers/scsi/scsi_transport_spi.c 	int ptr = (msg[msb] << 24) | (msg[msb+1] << 16) | (msg[msb+2] << 8) |
msb              1270 drivers/scsi/scsi_transport_spi.c 			msg[msb+3];
msb              1091 drivers/soc/mediatek/mtk-pmic-wrap.c 	int ret, msb;
msb              1094 drivers/soc/mediatek/mtk-pmic-wrap.c 	for (msb = 0; msb < 2; msb++) {
msb              1101 drivers/soc/mediatek/mtk-pmic-wrap.c 		pwrap_writel(wrp, ((msb << 30) | (adr << 16)),
msb              1109 drivers/soc/mediatek/mtk-pmic-wrap.c 			   PWRAP_WACS2_RDATA)) << (16 * msb));
msb              1140 drivers/soc/mediatek/mtk-pmic-wrap.c 	int ret, msb, rdata;
msb              1142 drivers/soc/mediatek/mtk-pmic-wrap.c 	for (msb = 0; msb < 2; msb++) {
msb              1149 drivers/soc/mediatek/mtk-pmic-wrap.c 		pwrap_writel(wrp, (1 << 31) | (msb << 30) | (adr << 16) |
msb              1150 drivers/soc/mediatek/mtk-pmic-wrap.c 			     ((wdata >> (msb * 16)) & 0xffff),
msb              1160 drivers/soc/mediatek/mtk-pmic-wrap.c 		if (!msb)
msb               177 drivers/staging/comedi/drivers/das08.c 	int lsb, msb;
msb               215 drivers/staging/comedi/drivers/das08.c 		msb = inb(dev->iobase + DAS08_AI_MSB_REG);
msb               218 drivers/staging/comedi/drivers/das08.c 			data[n] = (lsb >> 4) | (msb << 4);
msb               220 drivers/staging/comedi/drivers/das08.c 			data[n] = (msb << 8) + lsb;
msb               232 drivers/staging/comedi/drivers/das08.c 			unsigned int magnitude = lsb | ((msb & 0x7f) << 8);
msb               238 drivers/staging/comedi/drivers/das08.c 			if (msb & 0x80)
msb               308 drivers/staging/comedi/drivers/das08.c 	unsigned char msb;
msb               311 drivers/staging/comedi/drivers/das08.c 	msb = (data >> 8) & 0xff;
msb               314 drivers/staging/comedi/drivers/das08.c 		outb(msb, dev->iobase + DAS08JR_AO_MSB_REG(chan));
msb               319 drivers/staging/comedi/drivers/das08.c 		outb(msb, dev->iobase + DAS08AOX_AO_MSB_REG(chan));
msb               416 drivers/staging/comedi/drivers/das800.c 	unsigned int msb = inb(dev->iobase + DAS800_MSB);
msb               418 drivers/staging/comedi/drivers/das800.c 	return (msb << 8) | lsb;
msb               199 drivers/staging/comedi/drivers/ni_labpc_common.c 	unsigned int msb = devpriv->read_byte(dev, ADC_FIFO_REG);
msb               201 drivers/staging/comedi/drivers/ni_labpc_common.c 	return (msb << 8) | lsb;
msb              1103 drivers/staging/iio/addac/adt7316.c 	u8 msb, lsb;
msb              1119 drivers/staging/iio/addac/adt7316.c 			ADT7316_AD_MSB_DATA_BASE + channel, &msb);
msb              1123 drivers/staging/iio/addac/adt7316.c 		data = msb << ADT7316_T_VALUE_FLOAT_OFFSET;
msb              1134 drivers/staging/iio/addac/adt7316.c 			ADT7316_AD_MSB_DATA_BASE + channel, &msb);
msb              1138 drivers/staging/iio/addac/adt7316.c 		data = msb << ADT7316_T_VALUE_FLOAT_OFFSET;
msb              1148 drivers/staging/iio/addac/adt7316.c 			ADT7316_AD_MSB_DATA_BASE + channel, &msb);
msb              1152 drivers/staging/iio/addac/adt7316.c 		data = msb << ADT7316_T_VALUE_FLOAT_OFFSET;
msb              1397 drivers/staging/iio/addac/adt7316.c 	u8 msb, lsb, offset;
msb              1417 drivers/staging/iio/addac/adt7316.c 		ADT7316_DA_DATA_BASE + 1 + channel * 2, &msb);
msb              1425 drivers/staging/iio/addac/adt7316.c 	data |= msb << offset;
msb              1433 drivers/staging/iio/addac/adt7316.c 	u8 msb, lsb, lsb_reg, offset;
msb              1462 drivers/staging/iio/addac/adt7316.c 	msb = data >> offset;
msb              1464 drivers/staging/iio/addac/adt7316.c 		ADT7316_DA_DATA_BASE + 1 + channel * 2, msb);
msb               226 drivers/staging/pi433/rf69.c 	u8 msb;
msb               239 drivers/staging/pi433/rf69.c 	msb = (bit_rate_reg & 0xff00) >> 8;
msb               243 drivers/staging/pi433/rf69.c 	retval = rf69_write_reg(spi, REG_BITRATE_MSB, msb);
msb               258 drivers/staging/pi433/rf69.c 	u8 msb;
msb               276 drivers/staging/pi433/rf69.c 	msb = (f_reg & 0xff00) >> 8;
msb               280 drivers/staging/pi433/rf69.c 	if (msb & ~FDEVMASB_MASK) {
msb               286 drivers/staging/pi433/rf69.c 	retval = rf69_write_reg(spi, REG_FDEV_MSB, msb);
msb               302 drivers/staging/pi433/rf69.c 	u8 msb;
msb               322 drivers/staging/pi433/rf69.c 	msb = (f_reg & 0xff0000) >> 16;
msb               327 drivers/staging/pi433/rf69.c 	retval = rf69_write_reg(spi, REG_FRF_MSB, msb);
msb               648 drivers/staging/pi433/rf69.c 	u8 msb, lsb;
msb               653 drivers/staging/pi433/rf69.c 	msb = (preamble_length & 0xff00) >> 8;
msb               657 drivers/staging/pi433/rf69.c 	retval = rf69_write_reg(spi, REG_PREAMBLE_MSB, msb);
msb               117 drivers/thermal/qcom/tsens-common.c 		mask = GENMASK(priv->fields[LAST_TEMP_0].msb,
msb                84 drivers/thermal/qcom/tsens-v1.c 	u32 mode = 0, lsb = 0, msb = 0;
msb               102 drivers/thermal/qcom/tsens-v1.c 		msb   = (qfprom_cdata[1] & S2_P2_MASK_5_2) >> S2_P2_SHIFT_5_2;
msb               103 drivers/thermal/qcom/tsens-v1.c 		p2[2] = msb << 2 | lsb;
msb               110 drivers/thermal/qcom/tsens-v1.c 		msb   = (qfprom_cdata[3] & S7_P2_MASK_5_2) >> S7_P2_SHIFT_5_2;
msb               111 drivers/thermal/qcom/tsens-v1.c 		p2[7] = msb << 2 | lsb;
msb               110 drivers/usb/storage/alauda.c #define short_pack(lsb,msb) ( ((u16)(lsb)) | ( ((u16)(msb))<<8 ) )
msb                96 drivers/usb/storage/sddr09.c #define short_pack(lsb,msb) ( ((u16)(lsb)) | ( ((u16)(msb))<<8 ) )
msb                73 drivers/usb/storage/sddr55.c #define short_pack(lsb,msb) ( ((u16)(lsb)) | ( ((u16)(msb))<<8 ) )
msb               154 drivers/watchdog/pcwd_pci.c static int send_command(int cmd, int *msb, int *lsb)
msb               160 drivers/watchdog/pcwd_pci.c 			 cmd, *msb, *lsb);
msb               170 drivers/watchdog/pcwd_pci.c 	outb_p(*msb, pcipcwd_private.io_addr + 5);
msb               195 drivers/watchdog/pcwd_pci.c 		*msb = inb_p(pcipcwd_private.io_addr + 5);
msb               202 drivers/watchdog/pcwd_pci.c 				 cmd, *msb, *lsb);
msb               360 drivers/watchdog/pcwd_pci.c 	int msb;
msb               379 drivers/watchdog/pcwd_pci.c 	msb = 0;
msb               381 drivers/watchdog/pcwd_pci.c 	send_command(CMD_GET_CLEAR_RESET_COUNT, &msb, &reset_counter);
msb               415 drivers/watchdog/pcwd_pci.c 	int msb;
msb               420 drivers/watchdog/pcwd_pci.c 	send_command(CMD_READ_WATCHDOG_TIMEOUT, &msb, &lsb);
msb               422 drivers/watchdog/pcwd_pci.c 	*time_left = (msb << 8) + lsb;
msb               208 drivers/watchdog/pcwd_usb.c 		unsigned char cmd, unsigned char *msb, unsigned char *lsb)
msb               225 drivers/watchdog/pcwd_usb.c 	buf[1] = *msb;			/* Byte 1 = Data MSB */
msb               241 drivers/watchdog/pcwd_usb.c 			cmd, *msb, *lsb);
msb               255 drivers/watchdog/pcwd_usb.c 		*msb = usb_pcwd->cmd_data_msb;
msb               266 drivers/watchdog/pcwd_usb.c 	unsigned char msb = 0x00;
msb               272 drivers/watchdog/pcwd_usb.c 								&msb, &lsb);
msb               284 drivers/watchdog/pcwd_usb.c 	unsigned char msb = 0xA5;
msb               290 drivers/watchdog/pcwd_usb.c 								&msb, &lsb);
msb               312 drivers/watchdog/pcwd_usb.c 	unsigned char msb = t / 256;
msb               319 drivers/watchdog/pcwd_usb.c 	usb_pcwd_send_command(usb_pcwd, CMD_WRITE_WATCHDOG_TIMEOUT, &msb, &lsb);
msb               328 drivers/watchdog/pcwd_usb.c 	unsigned char msb, lsb;
msb               330 drivers/watchdog/pcwd_usb.c 	usb_pcwd_send_command(usb_pcwd, CMD_READ_TEMP, &msb, &lsb);
msb               344 drivers/watchdog/pcwd_usb.c 	unsigned char msb, lsb;
msb               348 drivers/watchdog/pcwd_usb.c 	usb_pcwd_send_command(usb_pcwd, CMD_READ_WATCHDOG_TIMEOUT, &msb, &lsb);
msb               350 drivers/watchdog/pcwd_usb.c 	*time_left = (msb << 8) + lsb;
msb               109 include/linux/leds-lp3952.h 			u8 msb;
msb              1081 include/linux/regmap.h 	unsigned int msb;
msb              1089 include/linux/regmap.h 				.msb = _msb,	\
msb              1888 include/uapi/linux/videodev2.h 	__u8	msb;
msb                81 include/video/gbe.h #define MASK(msb, lsb)		\
msb                82 include/video/gbe.h 	( (((u32)1<<((msb)-(lsb)+1))-1) << (lsb) )
msb                83 include/video/gbe.h #define GET(v, msb, lsb)	\
msb                84 include/video/gbe.h 	( ((u32)(v) & MASK(msb,lsb)) >> (lsb) )
msb                85 include/video/gbe.h #define SET(v, f, msb, lsb)	\
msb                86 include/video/gbe.h 	( (v) = ((v)&~MASK(msb,lsb)) | (( (u32)(f)<<(lsb) ) & MASK(msb,lsb)) )
msb               111 net/ipv4/tcp_cdg.c 	u32 msb = ux >> 8;
msb               116 net/ipv4/tcp_cdg.c 	if (msb > U16_MAX)
msb               123 net/ipv4/tcp_cdg.c 	for (i = 1; msb; i++, msb >>= 1) {
msb               124 net/ipv4/tcp_cdg.c 		u32 y = v[i & -(msb & 1)] + U32_C(1);
msb               359 sound/soc/codecs/nau8825.c 	u32 msb, logentry, significand, interpolation, log10val;
msb               363 sound/soc/codecs/nau8825.c 	msb = fls(value) - 1;
msb               378 sound/soc/codecs/nau8825.c 	significand = value << (31 - msb);
msb               399 sound/soc/codecs/nau8825.c 	log2val = ((msb << 24) + (logtable[logentry] << 8) + interpolation);
msb               619 sound/soc/codecs/rt5677.c 	unsigned int msb, lsb;
msb               644 sound/soc/codecs/rt5677.c 	regmap_read(rt5677->regmap_physical, RT5677_DSP_I2C_DATA_MSB, &msb);
msb               646 sound/soc/codecs/rt5677.c 	*value = (msb << 16) | lsb;
msb               194 sound/soc/sh/rcar/gen.c 		regf.msb	= 31;
msb               166 tools/perf/util/cs-etm.h #define BMVAL(val, lsb, msb)	((val & GENMASK(msb, lsb)) >> lsb)