rem: sPacketSize = PS2_PACKET_INTELLIMOUSE;
context: probe_mouse(void){	int8 deviceId = -1;	// get device id	if (ps2_write_aux_byte(PS2_CMD_GET_DEVICE_ID) == B_OK)		ps2_read_data(&deviceId);	TRACE(("probe_mouse(): device id: %2x\n", deviceId));			if (deviceId == 0) {		int32 tries = 5;		while (--tries > 0) {			// try to switch to intellimouse mode			if (ps2_set_sample_rate(200) == B_OK				&& ps2_set_sample_rate(100) == B_OK				&& ps2_set_sample_rate(80) == B_OK) {				// get device id, again				if (ps2_write_aux_byte(PS2_CMD_GET_DEVICE_ID) == B_OK)					ps2_read_data(&deviceId);				break;			}		}	}	if (deviceId == PS2_DEV_ID_STANDARD) {		sPacketSize = PS2_PACKET_STANDARD;		TRACE(("Standard PS/2 mouse found\n"));	} else if (deviceId == PS2_DEV_ID_INTELLIMOUSE) {		sPacketSize = PS2_PACKET_INTELLIMOUSE;		TRACE(("Extended PS/2 mouse found\n"));	} else {		// Something's wrong. Better quit		return B_ERROR;	}	return B_OK;}